critical priority medium complexity frontend pending frontend specialist Tier 0

Acceptance Criteria

OrgSelectionScreen widget exists at lib/features/onboarding/screens/org_selection_screen.dart
Screen renders a full-screen Scaffold with a scrollable body (SingleChildScrollView or CustomScrollView)
Screen contains a clearly-defined placeholder slot (Container with key or comment) for the org list widget
Screen contains a placeholder slot for the OnboardingProgressIndicator at the top or bottom of the layout
Screen contains a LoadingOverlay widget (or placeholder) that is shown when isLoading=true and hidden otherwise
Screen contains an ErrorStateContainer widget (or placeholder) that displays an error message when errorMessage is non-null
App router redirects unauthenticated users with no tenant context to OrgSelectionScreen (GoRouter redirect or equivalent)
Router wiring verified: navigating to '/' with no tenant context in app state renders OrgSelectionScreen
All interactive elements have minimum 44×44dp touch targets (verified visually and in code review)
Background and any visible text elements meet WCAG 4.5:1 contrast ratio using design token colors
Screen passes flutter analyze with zero errors and zero warnings
Screen is stateless or uses minimal local state (loading/error state managed by BLoC/Riverpod, not setState)

Technical Requirements

frameworks
Flutter
BLoC or Riverpod (state management)
GoRouter (routing)
data models
TenantContext
AppAuthState
performance requirements
Initial render completes within one frame (60fps) — no heavy computation in build()
Screen scaffold renders correctly on 320dp to 428dp screen widths
security requirements
Screen must not render or cache any org data until org is explicitly selected
Router redirect must prevent access to authenticated routes when tenant context is absent
ui components
Scaffold
SingleChildScrollView or CustomScrollView
LoadingOverlay (or CircularProgressIndicator placeholder)
ErrorStateContainer (or Text placeholder)
OrgListPlaceholder (slot for future OrgCardWidget list)
OnboardingProgressIndicator (slot)

Execution Context

Execution Tier
Tier 0

Tier 0 - 440 tasks

Implementation Notes

Use GoRouter's redirect parameter at the root route level: if (ref.read(tenantContextProvider) == null) return '/org-selection'. The OrgSelectionScreen itself should be a ConsumerWidget (Riverpod) or BlocBuilder (BLoC) that reads loading/error state from the appropriate provider. For layout: use a Column inside SingleChildScrollView with: (1) top padding, (2) OnboardingProgressIndicator slot, (3) Expanded/Flexible org list slot, (4) bottom padding. The LoadingOverlay should use Stack with a full-screen semi-transparent Container + CircularProgressIndicator, shown only when isLoading=true.

Use SafeArea to respect notches and home indicators. Keep the screen as a thin shell — all business logic belongs in the BLoC/provider layer.

Testing Requirements

Widget tests for the scaffold layout: verify Scaffold is present, verify placeholder slots render, verify loading overlay visibility toggles, verify error container shows message. Router test: use GoRouter.of(context) to verify the redirect rule fires when TenantContext is null in the provider. Use ProviderScope/BlocProvider overrides to control state during tests. Minimum 5 widget tests.

Run flutter analyze after implementation.

Epic Risks (2)
low impact high prob technical

OrgSelectionScreen and OrgContextSwitcher render partner-specific logos, colors, and text from dynamic data. Golden tests (pixel-comparison screenshots) will fail whenever branding assets are updated in the backend, causing CI failures that block unrelated PRs and eroding developer trust in the test suite.

Mitigation & Contingency

Mitigation: Use fixture-based golden tests with static mock Organization models containing embedded test assets rather than network-fetched assets. Separate branding asset acceptance tests into a dedicated CI job that only runs on branding-related PRs and is maintained by the design team.

Contingency: If golden test maintenance overhead becomes excessive, replace pixel-comparison goldens with semantic widget tests that assert widget tree structure and key property values, reserving golden tests for only the most stable, design-critical elements.

high impact medium prob scope

Several partner organizations (especially Blindeforbundet) have users who rely entirely on VoiceOver or TalkBack. Complex branded card layouts with overlaid logos, names, and selection states are notoriously difficult to make fully accessible; missing semantics or incorrect focus order could make the selection screen completely unusable for screen reader users before launch.

Mitigation & Contingency

Mitigation: Involve an accessibility specialist in the design review before any widget implementation begins. Use Flutter's Semantics widget with explicit label, hint, and button role on OrgCardWidget. Conduct manual screen reader testing on both iOS (VoiceOver) and Android (TalkBack) for every sprint that touches these screens, not just before release.

Contingency: If full WCAG compliance cannot be achieved within the sprint, implement a simplified text-list fallback mode that activates when the system detects an active screen reader, presenting orgs as plain accessible list tiles instead of the branded card layout.