Skip to content

fix(remote): notify URL in remote mode for OpenCode and Pi#663

Merged
backnotprop merged 2 commits intomainfrom
fix/print-outputs
May 5, 2026
Merged

fix(remote): notify URL in remote mode for OpenCode and Pi#663
backnotprop merged 2 commits intomainfrom
fix/print-outputs

Conversation

@backnotprop
Copy link
Copy Markdown
Owner

Summary

  • OpenCode regression fix: PR fix(opencode): remove verbose logs that flood the TUI #440 removed writeRemoteShareLink because the base64 share URL flooded the TUI, but no replacement was added. Remote users got zero feedback. Now logs the short localhost URL via client.app.log() in all onReady callbacks (submit_plan, review, annotate, annotate-last, archive).
  • Pi bug fix: openBrowserForServer relied on the openBrowser return value to detect remote mode, but isRemote was only set when BROWSER env was unset. Users running via Cursor (which sets BROWSER) never got the URL notification. Now checks isRemoteSession() directly.

Closes #551
Closes #574
Related: #601, #192, #435

Test plan

  • OpenCode remote: set PLANNOTATOR_REMOTE=1, call submit_plan → confirm [Plannotator] Open in browser: http://... appears in TUI log
  • OpenCode remote review: set PLANNOTATOR_REMOTE=1, run /plannotator-review → same
  • Pi remote with BROWSER set: set PLANNOTATOR_REMOTE=1 and BROWSER=some-browser, trigger plan review → confirm ctx.ui.notify fires with URL
  • Local mode: confirm no extra output when running locally (browser opens normally)

PR #440 removed writeRemoteShareLink from OpenCode because the base64
share URL flooded the TUI — but no replacement was added. Remote users
got zero feedback about where the server was listening.

OpenCode: log the short localhost URL via client.app.log() in all onReady
callbacks (submit_plan, review, annotate, annotate-last, archive).

Pi: check isRemoteSession() directly instead of relying on the openBrowser
return value, which only sets isRemote when BROWSER env is unset. Users
running via Cursor (which sets BROWSER) now get the notification.
The previous wording ("Remote session. Open manually:") implied the
browser failed even when BROWSER env successfully opened it via port
forwarding. Use a neutral informational message instead.
@backnotprop backnotprop merged commit 0b4c499 into main May 5, 2026
10 checks passed
@backnotprop backnotprop deleted the fix/print-outputs branch May 5, 2026 05:17
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.

v0.17.10: can't use submit_plan feature in opencode Web UI does not open automatically when Plannotator Code Review is triggered

1 participant