Skip to content

fix(tui): restore server config reading in TUI startup#23232

Open
GoldJohnKing wants to merge 1 commit intoanomalyco:devfrom
GoldJohnKing:fix/tui-server-config-ignored
Open

fix(tui): restore server config reading in TUI startup#23232
GoldJohnKing wants to merge 1 commit intoanomalyco:devfrom
GoldJohnKing:fix/tui-server-config-ignored

Conversation

@GoldJohnKing
Copy link
Copy Markdown

Issue for this PR

Closes #23230

Type of change

  • Bug fix

What does this PR do?

The TUI thread (thread.ts) was changed to call resolveNetworkOptionsNoConfig(args) without passing the config parameter. This causes opencode.json server settings (port, hostname, cors, mdns) to be completely ignored, since all config?.server.* values resolve to undefined.

The fix restores the call to resolveNetworkOptions(args), which reads the global config via Config.Service before resolving network options. This matches the v1.4.0 behavior.

The change: 2 lines — swap the import and make the call async with config loading.

How did you verify your code works?

Reproduced the issue on v1.4.11:

  • Configured server.hostname: "0.0.0.0" and server.port: 4096 in opencode.json
  • TUI started without listening on any port (ss -tlnp showed nothing on 4096)
  • After applying this fix, the TUI correctly starts the HTTP server on 0.0.0.0:4096

Checklist

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

The TUI thread was changed to use resolveNetworkOptionsNoConfig(args)
without passing the config parameter, causing opencode.json server
settings (port, hostname, cors, mdns) to be completely ignored.

This restored the resolveNetworkOptions(args) call which reads config
via Config.Service, matching the v1.4.0 behavior.

Closes anomalyco#23230
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.

[Bug]: TUI ignores server config (port, hostname, cors) since resolveNetworkOptionsNoConfig call missing config

1 participant