Review Peer Mentor Activity History on Contact Detail
The activity history list component is embedded in the contact detail screen and loads the peer mentor's registered activities from the contact detail repository. The list shows each activity with its date, type label (using the organization's custom terminology), duration, and chapter attribution. A time window selector allows the coordinator to filter by preset periods (last 30 days, last 6 months, this year) or a custom date range. Activities registered by proxy on behalf of this peer mentor are marked with a proxy audit badge to distinguish them from self-registered entries. The coordinator can tap any activity entry to navigate to the activity detail for further inspection or correction.
User Story
Audience Summaries
Coordinators are the frontline quality gatekeepers for activity reporting submitted to Bufdir, Norway's directorate for children, youth, and family affairs. Without an embedded activity history view on the contact detail screen, coordinators are forced to leave the contact context entirely and search through global activity logs to assess a single peer mentor's registration completeness — a friction-heavy process that reduces proactive monitoring and directly contributes to under-reporting. This story eliminates that friction by surfacing the full registration history inline, making it trivial to identify gaps before export deadlines. The proxy audit badge feature adds a critical governance layer, distinguishing coordinator-entered records from self-registered ones and supporting accountability across the chapter network.
Improved reporting completeness has direct implications for the organization's funding position, as grant disbursements are often tied to verified activity volume. This story delivers measurable value: fewer missed registrations, faster pre-submission reviews, and stronger audit trails.
Delivery complexity is moderate. The story depends on story-contact-detail-edit-screen-coordinator-1 being complete, as the activity history list is embedded within that screen's layout. Core work includes the activity history list component with infinite scroll pagination (triggered at 20+ records), the time window selector with four filter modes (Last 30 days, Last 6 months, This year, Custom date range), the proxy audit badge rendering logic, and navigation to the activity detail screen. The custom date range picker requires UX design sign-off to ensure it meets accessibility standards and coordinator workflow expectations.
QA must verify pagination continuity across filter changes and confirm that proxy-registered activities are consistently badged regardless of filter window. Empty state handling must be implemented and tested for all filter combinations. Coordination with the data team is needed to confirm that the contact detail repository query supports date-range filtering efficiently at scale — performance testing against large activity histories (500+ records) is recommended before release.
The activity history list component loads data from the contact detail repository, which must expose a paginated, filterable query interface supporting date range parameters and returning activity type, date, duration, chapter attribution, and a proxy flag per record. Infinite scroll pagination should use cursor-based pagination rather than offset to avoid record duplication or skipping when new activities are inserted during a session. The time window selector drives query parameter updates; on selection change, the list must reset to page one and reload — ensure no stale data is shown during the transition. The proxy audit badge is a presentation-layer concern: the API must return a boolean or enum field indicating proxy registration, and the component must render the badge conditionally without impacting list row height or accessibility tab order.
Navigation to the activity detail screen should pass the activity ID and preserve the originating contact context for breadcrumb rendering. Edge cases include activities spanning chapter boundaries, activities with null duration, and pagination behavior when filters reduce results mid-scroll. The empty state component must distinguish between 'no activities ever' and 'no activities in this date range' to guide coordinator action correctly.
Acceptance Criteria
- Given I am on the contact detail screen, When I scroll to the activity history section, Then I see a list of activities sorted by date descending, showing activity type, date, duration, and chapter
- Given the contact has more than 20 activity records, When I scroll to the bottom of the history list, Then the next page of records loads automatically (infinite scroll pagination)
- Given I am viewing the activity history, When I tap the time window selector, Then I can choose from preset options (Last 30 days, Last 6 months, This year, Custom) and the list filters accordingly
- Given an activity in the history was registered by a coordinator on behalf of this peer mentor, When it appears in the list, Then a proxy audit badge is shown next to the activity indicating proxy registration
- Given I tap an activity entry in the history list, When navigation occurs, Then I am taken to the activity detail screen for that specific registration
- Given the contact has no activities registered in the selected time window, When the filter is applied, Then an empty state message is shown with a suggestion to register the first activity
Business Value
Coordinators are responsible for the quality and completeness of activity reporting across their peer mentor network. Without an embedded activity history view on the contact detail screen, coordinators must leave the contact context and search through global activity logs to check a specific peer mentor's registration history — a time-consuming process that discourages proactive monitoring. Inline history visibility directly reduces under-reporting by making it trivial for coordinators to spot gaps, and enables faster pre-submission verification before Bufdir export deadlines.
Components
- Contact Detail Screen ui
- Activity History List ui
- Contact Detail Service service
- Contact Detail Repository data
- Proxy Audit Badge Widget ui
- Time Window Selector ui
- Time Window Service service