Skip to content

feat(server): export parse_navigate to native hosts - #340

Open
valentinfernandez1 wants to merge 1 commit into
mainfrom
vf/uniffi-parse-navigate
Open

feat(server): export parse_navigate to native hosts#340
valentinfernandez1 wants to merge 1 commit into
mainfrom
vf/uniffi-parse-navigate

Conversation

@valentinfernandez1

Copy link
Copy Markdown
Collaborator

Addresses https://github.com/paritytech/polkadot-app-android-v2/pull/953#discussion_r3680440720.

What

Exports parse_navigate from truapi-server's native surface over UniFFI, mirroring dotns::NavigateDecision as an FFI enum whose open variants carry the ready-to-load canonical URL. WebView hosts call it on every internal navigation and get the same .dot / localhost / external / reject classification the runtime uses, with the identifier kept lower-cased and NFC-normalized so hosts can compare it against the current page for same-domain checks.

Tests pin the mapping of all four variants and keep the FFI canonical URL byte-identical to what host_logic::dotns computes. The runtime's internal navigate path is unchanged.

@valentinfernandez1
valentinfernandez1 requested a review from a team August 4, 2026 17:51
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.

1 participant