Skip to content

Fix Electron backend URLs to respect configured GSM bind address - #534

Open
Chrisyk wants to merge 1 commit into
bpwhelan:mainfrom
Chrisyk:fix-localhost-bind
Open

Fix Electron backend URLs to respect configured GSM bind address#534
Chrisyk wants to merge 1 commit into
bpwhelan:mainfrom
Chrisyk:fix-localhost-bind

Conversation

@Chrisyk

@Chrisyk Chrisyk commented Jul 23, 2026

Copy link
Copy Markdown

Summary

Fix Electron and Python GSM backend URL construction to respect the configured advanced.localhost_bind_address instead of hardcoding localhost.

  • Read localhost_bind_address from GSM config in Electron
  • Pass localhostBindAddress through settings.getSettings
  • Use configured host for stats tab, backend status polling, texthook IPC, and GSM status checks
  • Update Python browser open / legacy moved-page redirect to use the configured client host

Testing

  • npm exec -- vitest run --config vitest.config.ts electron-src/main/gsm_config.test.ts
  • npm run build:main
  • python -m py_compile GameSentenceMiner/web/texthooking_page.py
  • npm run build

Notes

This fixes cases where GSM is bound to a non-localhost address, such as a Tailscale IP, causing Electron UI requests to localhost to fail even though the backend is running. Fixes infinite loading in pages such as Stats, unreachable Texthooker URLs, and silent IPC failures when GSM is bound to a non-localhost address.

- Stats Page (main.ts & index.html)
- Polling Backend (main.ts)
- Texthook IPC (texthook.ts)
- Obs IPC (obs.ts)
- Texthooker Web Call (texthooking_page.py)
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.

1 participant