Comfy-Org / Comfy-Org/ComfyUI_frontend
zh-CN locale fallback false-positives the sign-up region gate
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
The region-detection fallback in `packages/shared-frontend-utils/src/networkUtil.ts` treats a `zh-cn` locale as evidence the user is in mainland China. Locale is not location: a Chinese-locale user anywhere in the world trips this whenever the reachability probe is briefly unavailable, and gets hard-blocked from email sign-up with no recourse in the UI.
This predates https://github.com/Comfy-Org/ComfyUI_frontend/pull/14945 — that PR made the gate *correct about its own pending state*, and left this heuristic in place as a documented-unsound fallback. Filing so it is tracked rather than inherited silently.
## Why it matters more now
Before, an unsound verdict flashed a form the user could still use. Now the verdict is authoritative for what renders, so a false positive is a hard block rather than a flicker.
## Options
- Trust the edge geo-IP answer only, and fail open when it is unavailable. Correct, but weakens the gate on trace failure — a deliberate tradeoff, and one worth pairing with the server-side check in https://github.com/Comfy-Org/cloud/issues/6801.
- Keep locale as a signal but require corroboration from the reachability probe rather than accepting it alone.
- Give blocked users a visible path forward — the current UI is a dead end with no way to report a wrong verdict.
Worth deciding alongside the server-side enforcement, since that changes how much this client heuristic needs to carry.
Contributor guide
Assessment
This issue has not been assessed yet.