Skip to content

feat(opencode): add OPENCODE_DISABLE_WEB_UI env flag#16788

Open
mik3h0 wants to merge 1 commit intoanomalyco:devfrom
mik3h0:feat/disable-web-ui
Open

feat(opencode): add OPENCODE_DISABLE_WEB_UI env flag#16788
mik3h0 wants to merge 1 commit intoanomalyco:devfrom
mik3h0:feat/disable-web-ui

Conversation

@mik3h0
Copy link

@mik3h0 mik3h0 commented Mar 9, 2026

Issue for this PR

Closes #16787
Related: #12445, #11981

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

TUI-only users have no need for the web UI, but the local server proxies all unmatched requests to app.opencode.ai. This adds a way to disable that.

Config: { "server": { "web": false } }
Env: OPENCODE_DISABLE_WEB=true

When disabled, the catch-all proxy returns 404. Complements OPENCODE_DISABLE_SHARE and OPENCODE_DISABLE_MODELS_FETCH for users who want full control over outbound traffic. Lighter alternative to #12445 for users who simply don't need the web UI at all.

How did you verify your code works?

  • tsc --noEmit passes
  • Guard short-circuits before any fetch to app.opencode.ai
  • Config wired through resolveNetworkOptionsServer.listen, matching existing cors/mdns patterns

Screenshots / recordings

N/A — no UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Mar 9, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@mik3h0 mik3h0 force-pushed the feat/disable-web-ui branch from 4a919f1 to 30c6bdc Compare March 9, 2026 17:24
@mik3h0
Copy link
Author

mik3h0 commented Mar 9, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

i don't think it does. Converted to draft

Add server.web config option and OPENCODE_DISABLE_WEB env flag.
When either disables the web UI, the catch-all route that forwards
requests to app.opencode.ai returns 404 instead.

Config: { "server": { "web": false } }
Env:    OPENCODE_DISABLE_WEB=true

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mik3h0 mik3h0 force-pushed the feat/disable-web-ui branch from 30c6bdc to 48134b2 Compare March 9, 2026 17:26
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.

[FEATURE]: Option to disable web UI proxy for TUI-only usage

1 participant