Skip to content

[EPAC-743]: Display government's official tabled response for petitions#797

Merged
riddim-developer-bot[bot] merged 2 commits into
mainfrom
symphony/epac-743-petition-government-response-display-the-governm
Jun 12, 2026
Merged

[EPAC-743]: Display government's official tabled response for petitions#797
riddim-developer-bot[bot] merged 2 commits into
mainfrom
symphony/epac-743-petition-government-response-display-the-governm

Conversation

@riddim-developer-bot

Copy link
Copy Markdown
Contributor

Summary

This PR implements the iOS-side feature to display the government's official tabled response to a petition on the petition detail screen (PetitionDetailView), fulfilling the EPAC-743 requirements.

Changes:

  • Entities / Models: Extended EPetition model with an optional governmentResponse: PetitionGovernmentResponse value object.
  • Ports: Created PetitionGovernmentResponseQueryPort to define the boundary for fetching a petition's government response.
  • Adapters:
    • Implemented BackendPetitionGovernmentResponseQueryPort which fetches the response from the backend endpoint: GET /api/v1/petitions/{id}/response.
    • Added a "Government Response" section to PetitionDetailView that displays when a response is present (showing the tabled date, responding minister/department, and verbatim response text).
    • Handles the qualified/awaiting response state (displaying "Awaiting government response" for petitions with >= 500 signatures) and the did-not-qualify state.
  • Documentation: Updated the use-case-catalog.md with the new entities, ports, and the LoadPetitionGovernmentResponse use case.
  • Tests:
    • Added unit tests for the use case LoadPetitionGovernmentResponseTests.
    • Added integration/unit tests for the adapter BackendPetitionGovernmentResponseQueryPortTests using mock protocols.
    • Added snapshot tests in SnapshotTests covering all three visual states (withResponse, awaitingResponse, notQualified) and committed the reference snapshot images.

JSON Contract

{
  "text": "String",
  "tabled_on": "YYYY-MM-DD",
  "responding_minister": "String?"
}

Verification

  • Local unit tests build and run successfully:
    • make test TEST_ONLY=LoadPetitionGovernmentResponseTests
    • make test TEST_ONLY=BackendPetitionGovernmentResponseQueryPortTests
  • Snapshot tests compile and successfully generate comparison reference images:
    • make test TEST_ONLY=SnapshotTests
  • Working copy status is verified clean with git status --porcelain.

@riddim-developer-bot
riddim-developer-bot Bot enabled auto-merge (squash) June 12, 2026 21:15
@riddim-developer-bot
riddim-developer-bot Bot merged commit 3607440 into main Jun 12, 2026
35 of 36 checks passed
@riddim-developer-bot
riddim-developer-bot Bot deleted the symphony/epac-743-petition-government-response-display-the-governm branch June 12, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants