Add fallback defaults to OrgLabelsProvider
epic-peer-mentor-detail-screen-ui-components-task-002 — Extend OrgLabelsProvider to supply hardcoded fallback terminology strings when the Supabase stream is unavailable or returns null values. Define a LabelDefaults constant map covering all label keys used across peer mentor detail widgets, ensuring graceful degradation for offline or unconfigured orgs.
Acceptance Criteria
Technical Requirements
Execution Context
Tier 1 - 540 tasks
Can start after Tier 0 completes
Implementation Notes
Implement fallback merging as: `final resolved = Map
Testing Requirements
Unit tests: (1) all OrgLabelKeys keys are present in LabelDefaults — assert map completeness, (2) stream emitting a partial map correctly merges with defaults so missing keys are filled, (3) null value in stream row is replaced by default, (4) AsyncError state resolves to full default map for consumers. These tests are pure Dart and must not require a running Supabase instance.
The org labels system may not yet have label keys defined for peer mentor detail screen terminology (role labels, section headings), requiring additions to the label key registry that must be coordinated with the admin configuration team.
Mitigation & Contingency
Mitigation: Audit existing label keys in the terminology system before starting OrgLabelsProvider integration. Submit required new label keys for admin configuration in parallel with component implementation.
Contingency: If label keys are not available at integration time, use hardcoded English fallbacks with a clear TODO for admin configuration, ensuring the widget renders correctly while keys are being provisioned.
The design token semantic colors (warning, error surface) may not meet WCAG 2.2 AA 4.5:1 contrast ratio when rendered on the app's background surface tokens, requiring design system changes that affect the entire app.
Mitigation & Contingency
Mitigation: Run contrast ratio validation on the token palette during Epic 1 design token implementation. Flag any failing pairs to the design system owner before building UI components that depend on them.
Contingency: If tokens fail contrast requirements, define supplementary high-contrast override tokens specific to alert and badge contexts that meet AA without modifying the global palette.