Skip to content

[EPAC-691]: Royal Assent tracker — Home card, Became Law filter, follow-bill notifications#800

Open
riddim-developer-bot[bot] wants to merge 1 commit into
mainfrom
symphony/epac-691-royal-assent-tracker-surface-bills-that-recently
Open

[EPAC-691]: Royal Assent tracker — Home card, Became Law filter, follow-bill notifications#800
riddim-developer-bot[bot] wants to merge 1 commit into
mainfrom
symphony/epac-691-royal-assent-tracker-surface-bills-that-recently

Conversation

@riddim-developer-bot

Copy link
Copy Markdown
Contributor

Summary

Implements the iOS slice of EPAC-691. Closes the legislative loop when a bill becomes law:

  • New Recently Became Law card on the Home feed showing bills that received Royal Assent in the last 30 days (most recent first) with the bill number, title, Royal Assent date, sponsoring MP (linked to MemberProfileView when the MP is in the local SwiftData store, falling back to a Parliament.ca sponsor link), LEGISinfo summary subtitle, and a LEGISinfo link.
  • New Became Law filter tab on the Bills tab; the "See laws" link from the Home card deep-links into it.
  • Local notification when a followed bill transitions to Royal Assent during a backend bill refresh — uses UNUserNotificationCenter behind RoyalAssentNotificationPort so the use case stays free of platform notification APIs.

Clean Architecture additions (per the issue's Clean Architecture Shape):

Layer New
Use cases TrackRoyalAssent, NotifyFollowedBillRoyalAssent
Domain ports RecentLawQueryPort, RoyalAssentNotificationPort
Domain entity RoyalAssentNotification
Adapters LiveRoyalAssentNotificationAdapter
UI RecentlyBecameLawCard, BillsView becameLaw filter tab

Bill now carries royalAssentDate, summary, and sponsorProfileURL, parsed from the existing LEGISinfo adapter (no new wire format on iOS).

Use case catalog updated with both new use cases and their adapter pointers.

Test plan

  • TrackRoyalAssentTests — filters to last 30 days and sorts most recent first.
  • NotifyFollowedBillRoyalAssentTests — emits a properly formatted notification through the port.
  • SnapshotTests.testRecentlyBecameLawCard — pixel snapshot of the new home card.
  • SwiftLint --strict clean on changed files (71 pre-existing violations unrelated to this change).
  • Local simulator verification: deferred to CI's pr-build because the local build database was contended between concurrent agent sessions. New use case + view layer compiled cleanly in intermediate builds before the rebase (TrackRoyalAssent.d / NotifyFollowedBillRoyalAssent.d present in DerivedData).
  • Live Royal Assent observation: covered by the project Human Handoff issue, not blocking.

Release-Note: New "Recently Became Law" card on the Home feed, a "Became Law" filter in the Bills tab, and a notification when a bill you follow receives Royal Assent.

…ow-bill notifications

Adds the iOS slice that closes the legislative loop when a bill becomes law:

- TrackRoyalAssent use case + RecentLawQueryPort surface bills that received
  Royal Assent in the last 30 days, sorted most recent first.
- NotifyFollowedBillRoyalAssent use case + RoyalAssentNotificationPort schedule
  a local user notification when a followed bill transitions to Royal Assent
  during a backend bill refresh. UNUserNotificationCenter stays behind
  LiveRoyalAssentNotificationAdapter.
- Bill gains royalAssentDate, summary, and sponsorProfileURL parsed from
  the existing LEGISinfo adapter (no new wire format on iOS).
- HomeFeedView adds a "Recently Became Law" section backed by
  RecentlyBecameLawCard. Each row links into BillDetailView, surfaces the
  sponsor as a MemberProfileView link when the local SwiftData store has
  the MP, falls back to a Parliament.ca sponsor link otherwise, and links
  out to LEGISinfo.
- BillsView accepts an initialTab argument so the home "See laws" link
  deep-links into the Became Law filter.
- BillFollowStore triggers the notification path when refresh data shows
  a followed bill flipped to Royal Assent.
- Use case catalog gains TrackRoyalAssent and NotifyFollowedBillRoyalAssent
  entries with current implementation pointers.

Release-Note: New "Recently Became Law" card on the Home feed, a "Became Law"
filter in the Bills tab, and a notification when a bill you follow receives
Royal Assent.
@riddim-developer-bot

Copy link
Copy Markdown
Contributor Author

#800

@riddim-developer-bot riddim-developer-bot Bot enabled auto-merge (squash) June 13, 2026 20:37
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