[BUG 976] Make useLocalInstall() more complete#981
Draft
alanhargreaves wants to merge 2 commits into
Draft
Conversation
Make use of serverCfg.serverLocal if it exists in useLocalInstall() Make useLocalInstall() check a few more things, including allowing a true setting for serverCfg.serverLocal overriding anything else
accius
reviewed
May 19, 2026
Owner
accius
left a comment
There was a problem hiding this comment.
Good direction overall. Adding the .home / .lan / .internal host patterns expands coverage cleanly, and hoisting the useLocalInstall() call up to App and passing the boolean down via props eliminates the duplicate hook calls in SettingsPanel/WorldMap. The serverLocal env-driven override is a useful escape hatch for unusual deployments (Tailscale, reverse-proxied LAN hosts on public-looking domains, etc.).
Two things before this is ready to come out of draft:
- The "How to test" section in the PR description is still TODO — please fill that in so reviewers (and future you) can validate the expanded host pattern matrix and the
serverLocaloverride path. - The frontend reads
serverCfg.serverLocalinuseAppConfig.js, but I don't see the corresponding server-side change that surfaces that field through/api/config(or wherevergetServerConfig()resolves). If that lives in another commit on the branch, great — otherwise it'll need to be added so the override actually flows through end-to-end.
Holding the merge until it's out of draft.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
useLocalInstall()check a few more domain namesuseLocalInstall()App.envvariable called localServer, which defaults to false. If this is set totrueit will override all other checks in `useLocalInstall()Type of change
How to test
TODO
Checklist
server.js: caches have TTLs and size caps (we serve 2,000+ concurrent users)var(--accent-cyan), etc.).bak,.old,console.logdebug lines, or test scripts includedScreenshots (if visual change)