high priority low complexity frontend pending frontend specialist Tier 1

Acceptance Criteria

A `LabelDefaults` constant map (Map<String, String>) is defined in `lib/providers/org_labels_provider.dart` or a dedicated `lib/constants/label_defaults.dart`
LabelDefaults covers every key defined in OrgLabelKeys — no key is missing from the fallback map
When the Supabase stream emits a row with a null value for a key, the provider substitutes the LabelDefaults value for that key
When the Supabase stream is in AsyncLoading or AsyncError state, consumers that use a `when(data:, loading:, error:)` pattern receive the fallback map instead of an empty/null map
A helper method or extension (e.g., `resolveLabel(String key)`) merges live data over defaults so partial org configs work correctly
Offline scenario: with no network, widgets display default English terminology rather than blank strings or error UI
All default strings are written in English

Technical Requirements

frameworks
Flutter
Riverpod
data models
OrgLabels
LabelDefaults (Map<String, String>)
performance requirements
Fallback resolution must be O(1) per key lookup — use map merge, not iteration
security requirements
Fallback strings must not expose internal system names or org-confidential terminology

Execution Context

Execution Tier
Tier 1

Tier 1 - 540 tasks

Can start after Tier 0 completes

Implementation Notes

Implement fallback merging as: `final resolved = Map.from(LabelDefaults)..addAll(liveData)` — this ensures defaults fill gaps and live data overrides where present. Expose a `resolvedLabelsProvider` (a plain `Provider>`) derived from OrgLabelsProvider that always returns a non-null, fully-populated map (using defaults during loading/error). Widgets should consume `resolvedLabelsProvider`, not the raw StreamProvider, to avoid `when()` boilerplate at every call site. Keep LabelDefaults as a `const` map to avoid runtime allocation overhead.

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.

Component
Organization Labels Provider
infrastructure low
Epic Risks (2)
medium impact medium prob dependency

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.

high impact low prob technical

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.