Add Personal WP desktop relay access#3746
Draft
akirk wants to merge 12 commits into
Draft
Conversation
41b46d5 to
e345c55
Compare
8fd6b9e to
c6230d6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds desktop access for Personal WP sessions so a site running on a phone can be opened from a desktop through the deployed relay.
Flow
/relay/{sessionId}/poll./connect./relay/{sessionId}/request/..../relay/{sessionId}/response/{requestId}, and the relay returns it to the desktop browser./scope:default/...to the relay request path. This keeps WordPress navigations, redirects, AJAX, forms, and direct scoped requests attached to the phone-backed session.Implementation
relay.phpfor session creation, host polling, guest request waiting, and response delivery.TunnelHoston the phone side that processes relay requests against the active Playground client./connectflow.Locationheaders so requests stay inside the tunnel./scope:default/...requests do not time out waiting for a local desktop Playground runtime.install-blueprintpostMessages with a visible desktop notice instead of silently failing.Testing
npm exec nx run playground-remote:typechecknpm exec nx run playground-personal-wp:typechecknpm exec nx run playground-personal-wp:testphp -l packages/playground/personal-wp/public/relay.phpNotes
This is intended for short-lived desktop use with the phone nearby. While a desktop relay viewer is connected, scoped Personal WP traffic for the origin is routed to the phone-backed relay session.