high priority low complexity frontend pending frontend specialist Tier 4

Acceptance Criteria

Tapping the card body (excluding the dismiss button) navigates to the mentor profile summary screen
Navigation passes both `mentorId` and `summaryPeriodId` as typed route arguments
Back navigation (device back button or app back button) returns to the home screen
On return to home screen, the PeriodicSummaryCard is still visible and in its previously loaded state (not re-dismissed, not reset to loading)
If the destination screen's data is still loading, a loading skeleton is shown on the destination — the card does not block or show an error
Navigation uses the project's existing StatefulShellRoute / GoRouter setup — no custom Navigator.push calls
Tapping the card while already on the destination screen does not push a duplicate route
If `mentorId` or `summaryPeriodId` are null/missing, navigation is suppressed and a debug assertion fires

Technical Requirements

frameworks
Flutter
BLoC
data models
PeriodicSummary
performance requirements
Navigation transition must complete within one frame budget — no blocking operations on tap handler
security requirements
Route arguments must be typed — no raw string interpolation of IDs into route paths to prevent path injection
ui components
GoRouter named route for mentor profile summary
MentorProfileSummaryScreen (destination, pre-existing or stub)

Execution Context

Execution Tier
Tier 4

Tier 4 - 323 tasks

Can start after Tier 3 completes

Implementation Notes

Use GoRouter's `context.goNamed('mentor-profile-summary', extra: MentorSummaryRouteArgs(mentorId: ..., periodId: ...))` pattern with a typed `extra` argument class — avoids stringly-typed path params and prevents injection. The home screen's BLoC state must be preserved across navigation: since the card uses `BlocProvider` at the home screen level (not inside the route), the BLoC will survive the push/pop cycle naturally with StatefulShellRoute. Do NOT re-dispatch `LoadPeriodicSummaryCard` on `didChangeDependencies` or `initState` if the BLoC is already in Loaded state — check state before dispatching. Add a guard: `if (mentorId == null || periodId == null) { assert(false, 'Navigation args missing'); return; }` before calling GoRouter.

Testing Requirements

Widget tests using GoRouter test helpers: (1) tapping card body triggers navigation to mentor profile route with correct arguments, (2) tapping dismiss button does NOT trigger navigation, (3) navigating back from destination leaves card in Loaded state (not Loading or Dismissed). Unit test: null/missing ID case suppresses navigation. Integration test: full tap → navigate → back → card visible flow using pumpWidget with GoRouter.

Component
Periodic Summary Digest Card
ui medium
Epic Risks (3)
medium impact medium prob technical

If the cached summary is from a prior period (e.g., previous quarter's card is still cached), the digest card could appear on the home screen with outdated numbers after a new period begins, confusing users who have already seen that data.

Mitigation & Contingency

Mitigation: In the SummaryCacheRepository, store the period_start and period_end alongside cached data. In the PeriodicSummaryCard BLoC, compare the cached record's period against the current date using PeriodCalculatorService. Only render the card if the cached summary belongs to the active period.

Contingency: If stale cards appear in production, push a hotfix that adds the period validity check to the BLoC and clears all cached summaries older than the current period boundary via a forced cache flush on next app launch.

medium impact medium prob technical

Using colour alone to distinguish underactive from overloaded mentors in the coordinator view would fail WCAG 1.4.1 (use of colour). This is especially critical for organisations serving users with colour vision deficiency.

Mitigation & Contingency

Mitigation: Always pair colour indicators with a text label or icon (e.g., a downward arrow + 'Underactive' text alongside the amber colour). Use the contrast-safe-color-palette design tokens throughout. Run the contrast-ratio-validator on all new colour combinations in CI.

Contingency: If an accessibility audit flags colour-only indicators post-launch, introduce icon-based indicators as a patch release and update the design token definitions to enforce the paired-indicator pattern going forward.

low impact medium prob integration

Inserting a new card into the role-based home screen requires changes to shared home screen widget composition, which may conflict with parallel feature branches also modifying the home screen layout, causing merge conflicts and integration delays.

Mitigation & Contingency

Mitigation: Implement the PeriodicSummaryCard as a fully self-contained widget that the home screen conditionally renders based on a BLoC state flag. Minimise changes to the home screen itself to a single conditional insertion point, reducing the surface area for merge conflicts.

Contingency: If integration conflicts block the PR, isolate the card behind the organisation-scoped feature flag so it can be toggled independently and merged without affecting other home screen changes.