opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix(TUI): make tui work when OPENCODE_SERVER_PASSWORD is set

Open LeonMueller-OneAndOnly opened this issue 1 week ago • 2 comments

What does this PR do?

When setting the OPENCODE_SERVER_PASSWORD env varaiable the regular tui app would no longer work. See the issue this PR fixes for details please.

How did you verify your code works?

Run OPENCODE_SERVER_PASSWORD='secure-password' bun dev . after applying fix and sending a test-prompt. Furthermore checked that when I return undefined for my new "getAuthorizationHeader" helper and run the same comment the previous issue persists, so this isn't due to the bundles CLI tool behaving different from bun dev .in this regard.

Fixes #8173

LeonMueller-OneAndOnly avatar Jan 13 '26 09:01 LeonMueller-OneAndOnly

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

github-actions[bot] avatar Jan 13 '26 09:01 github-actions[bot]

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

github-actions[bot] avatar Jan 13 '26 09:01 github-actions[bot]

/review

rekram1-node avatar Jan 13 '26 22:01 rekram1-node

lgtm

github-actions[bot] avatar Jan 13 '26 22:01 github-actions[bot]

This PR fixed the TUI authentication for the RPC communication path, but there was still an issue when TUI starts an HTTP server (due to --port flag being set). The complete fix is now available in PR #9095, which addresses the HTTP server authentication path.

LeonMueller-OneAndOnly avatar Jan 17 '26 15:01 LeonMueller-OneAndOnly