Skip to content

Pass the full VisitProposal to registered RouteDecisionHandler instances#249

Merged
svara merged 1 commit into
mainfrom
augment-decision-handler
Jul 6, 2026
Merged

Pass the full VisitProposal to registered RouteDecisionHandler instances#249
svara merged 1 commit into
mainfrom
augment-decision-handler

Conversation

@svara

@svara svara commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Pass VisitProposal to route decision handlers

Route decision handlers previously only received the destination location URL, which limited the routing logic apps could implement. This change passes the full VisitProposal instead — giving apps access to the location, visit options, path configuration properties, and parameters so they can build more comprehensive RouteDecisionHandlers.

⚠️ Breaking API changes

  • RouteDecisionHandler.matches(location: URL, ...)matches(proposal: VisitProposal, ...)
  • RouteDecisionHandler.handle(location: URL, ...)handle(proposal: VisitProposal, ...)

Apps with custom RouteDecisionHandler implementations will need to update their signatures. The location is still available via proposal.url.

Notes

  • The built-in handlers (app navigation, system navigation, Safari view controller) and their tests have been updated accordingly.
  • Router now logs the full proposal (rather than just the location) when a handler matches or when no handler is found.

Mirrors hotwired/hotwire-native-android#203.

@svara
svara marked this pull request as ready for review July 6, 2026 07:08
@svara
svara merged commit bc57aa1 into main Jul 6, 2026
1 of 2 checks passed
@svara
svara deleted the augment-decision-handler branch July 6, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant