backnotprop / backnotprop/plannotator

Pi Web RPC sessions do not show the Plannotator review URL

Open
#1,406 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
8.7k
Forks
649
PR merge metrics
PR metrics pending

Description

### What happened?

When Plannotator is used from a Pi session hosted through Pi Web's RPC mode, the review server starts, but the review URL is not reliably shown in the Pi session UI.

Pi Web binds extensions with `ExtensionContext.mode === "rpc"`. In this mode, `isRemoteSession()` is normally false because the process is not necessarily running over SSH and does not require `PLANNOTATOR_REMOTE=1`.

`openBrowser()` may report that launching a browser succeeded after spawning a local browser command. However, the browser is running in the Pi Web host context and the user may not have access to it. Because the session is not identified as remote, `openBrowserForServer()` can return without notifying the RPC UI of the URL.

### Plannotator version

`@plannotator/pi-extension 0.27.8`

### OS

Linux

### Agent

Pi

### Where did it happen?

Code review

### Steps to reproduce

1. Run Pi Web with a normal RPC session.
2. Load the Plannotator Pi extension.
3. Trigger `/plannotator-review`, `/plannotator-annotate`, or `/plannotator-last`.
4. Observe the Pi Web session output.

### Expected behavior

The Pi RPC session should always receive an informational notification containing the Plannotator review URL, for example:

```text
[Plannotator] http://localhost:
```

### Actual behavior

The review server is started, but the review URL is not reliably visible in the RPC session. The result depends on whether the host process believes that a local browser was opened.

### Additional context

This is related to the remote URL notification work in [#663](https://github.com/backnotprop/plannotator/pull/663), but Pi Web RPC mode is distinct from Plannotator's existing `isRemoteSession()` detection.

The desired behavior is limited to URL notification. It should not change server binding, authentication, port forwarding, advertised-host handling, or remote-session detection.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.