fix(pi): notify review URL in RPC sessions - #1407
Open
Shujakuinkuraudo wants to merge 1 commit into
Open
Conversation
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.
Summary
Pi Web runs extensions with
ExtensionContext.mode === "rpc". In this mode,Plannotator's
isRemoteSession()can remain false even though the user cannotdirectly access the browser launched by the Pi Web host process.
openBrowserForServer()currently notifies the URL only for remote sessions orwhen browser launch reports failure. A successful browser spawn in the Pi Web
host can therefore hide the URL from the RPC session.
Treat RPC extension contexts like remote sessions for the purpose of URL
notification:
Behavior
PLANNOTATOR_REMOTEsessions keep their existing behavior.ctx.ui.notify()evenwhen the browser launcher reports success.
and port forwarding are unchanged.
it only exposes the URL to the user so an explicitly configured access path
can be used.
Test plan
PLANNOTATOR_REMOTE=0.BROWSERat the current Node executable, so no real browseris opened while the launcher still reports success.
[Plannotator] <url>notification.
git diff --checkpasses.in the development environment; GitHub Actions should run the repository's
standard checks.
Closes #1406