HIGH story-document-attachment-peer-mentor-004 3 pts
3
Story Points
High
Priority
Document Attachment to Activities
Feature

User Story

As a user
I want to view all documents attached to an activity when I open its detail view
So that So that I can verify what evidence has been submitted and access the attached files for reference or review

Acceptance Criteria

  • Given the user opens an activity detail screen that has attached documents, when the document attach widget loads, then it displays thumbnails of all attached documents in a horizontal scroll list
  • Given the user taps a document thumbnail, when the document opens, then it is displayed using a signed URL with a 15-minute TTL generated by the Document Storage Service
  • Given the activity has no attached documents, when the document attach widget loads, then an empty state message is shown with an option to add a document
  • Given the signed URL for a document has expired (TTL elapsed), when the user attempts to open the document, then a new signed URL is requested and the document opens successfully
  • Given the user has a role restricted from accessing a document outside their organization, when they attempt to view it, then access is denied via RLS bucket policies and an appropriate error is shown

Business Value

Coordinators and peer mentors need to verify that evidence is correctly attached before submitting Bufdir reports. Providing secure, on-demand access to attachments directly from the activity detail screen ensures audit trails are complete and reviewable without leaving the app.