openwork icon indicating copy to clipboard operation
openwork copied to clipboard

[Bug]: 无法使用client端模式

Open andywuuuuu opened this issue 9 months ago • 3 comments

Summary

无法使用client端模式,只能强制使用本地的localhost:4096, 使用文档和操作文档都没有提供

Steps to reproduce

无法使用client端模式,只能强制使用本地的localhost:4096, 使用文档和操作文档都没有提供

Expected behavior

无法使用client端模式,只能强制使用本地的localhost:4096, 使用文档和操作文档都没有提供

Actual behavior

无法使用client端模式,只能强制使用本地的localhost:4096, 使用文档和操作文档都没有提供

andywuuuuu avatar Feb 05 '26 06:02 andywuuuuu

Retest result (focused on @benjiming's host concern):

  • Client mode works; custom host is respected (not forced to 127.0.0.1:4096).
  • When URL is set to http://127.0.0.1:5999, requests go to 5999 (and fail only because no server is running there).
  • With opencode serve --port 6190, OpenWork connects successfully; Settings shows Connected and Base URL http://127.0.0.1:6190.

Note: console still shows periodic 127.0.0.1:4096/global/health polling errors, which may create the impression that it is forced to 4096.

Screenshot: issue-448-retest

Golenspade avatar Feb 06 '26 03:02 Golenspade

can you retest in latest versions please

OmarMcAdam avatar Mar 18 '26 22:03 OmarMcAdam

Retest result (2026-03-19, latest dev @ f94ae1f7)

Tested in web client mode (Vite dev server, non-Tauri).

✅ Client mode works — custom host is respected

  • Via "Add a worker" → "Connect remote", user can set a custom OpenWork server URL (e.g. http://127.0.0.1:5999). The app will attempt to connect to that address.
  • When URL is set to a custom port, requests to /health and /workspaces go to the custom port (and fail only because no server is running there).

⚠️ Residual 127.0.0.1:4096 health polling still present

  • Even after setting a custom Worker URL, the console still shows periodic 127.0.0.1:4096/global/health polling errors. This is because the OpenCode engine connection (ServerProvider) and the OpenWork server connection are two independent systems:
    • ServerProvider (OpenCode engine) → defaults to 127.0.0.1:4096, health-checks every 10s
    • openworkServerSettings (OpenWork server) → configurable via "Add Worker → Connect Remote"
  • This polling creates the strong impression that the app is forced to 4096, which is the root cause of user confusion.

⚠️ Settings → Advanced URL is read-only

The connection URL shown in Settings → Advanced is display-only, not editable. Users must use "Add Worker → Connect Remote" to change it.

Screenshots

Settings → Advanced page (URL is read-only):

settings-advanced

Add Remote Worker dialog (custom URL input):

add-remote-worker

Custom URL http://127.0.0.1:5999 entered:

custom-url

Conclusion

Same findings as previous retest (2026-02-06): client mode works, custom URL is respected via the "Connect Remote" flow. The residual 4096 health polling and lack of user-facing documentation remain the main sources of confusion.

Golenspade avatar Mar 19 '26 02:03 Golenspade