Skip to content

Comments

feat: add network access toggle to server settings#133

Open
rayl15 wants to merge 1 commit intojamiepine:mainfrom
rayl15:feat/network-access-toggle
Open

feat: add network access toggle to server settings#133
rayl15 wants to merge 1 commit intojamiepine:mainfrom
rayl15:feat/network-access-toggle

Conversation

@rayl15
Copy link

@rayl15 rayl15 commented Feb 20, 2026

Summary

  • Adds an "Allow network access" checkbox to Server Connection settings
  • When enabled, the server binds to 0.0.0.0 instead of 127.0.0.1, making it accessible from other devices on the network
  • Setting is persisted and applied on next app launch

Details

The plumbing for this already existed:

  • Rust (main.rs): passes --host 0.0.0.0 when remote=true
  • Store (serverStore.ts): has mode: 'local' | 'remote' with persistence
  • Python (server.py): accepts --host CLI arg
  • Frontend (lifecycle.ts): startServer(remote) accepts boolean

But App.tsx hardcoded startServer(false), and no UI exposed the toggle. This PR wires it up:

  1. App.tsx — reads persisted mode from store on startup and passes mode === 'remote' to startServer()
  2. ConnectionForm.tsx — adds a checkbox that toggles mode between 'local' and 'remote', with a toast indicating restart is required

Only shown in Tauri (desktop) mode, not in web.

Closes #104

Test plan

  • Toggle "Allow network access" in Server settings — checkbox renders, toast shows
  • Backend with --host 0.0.0.0 binds to all interfaces (TCP *:17493)
  • Backend with --host 127.0.0.1 only accessible on localhost
  • LAN IP access works when bound to 0.0.0.0
  • Full Tauri build + restart cycle (requires Xcode)

Exposes the existing remote server mode through a checkbox in Server
Connection settings. When enabled, the server binds to 0.0.0.0 instead
of 127.0.0.1, making it accessible from other devices on the network.

The plumbing already existed (Rust sidecar passes --host 0.0.0.0 when
remote=true, serverStore has mode state, Python backend accepts --host),
but the UI hardcoded startServer(false). This wires it up.

Closes jamiepine#104
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.

server IP

1 participant