3x-ui/frontend/src/test
PathGao 579acbc669
fix(settings): keep the stored port when a port field is cleared (#6121)
* fix(settings): keep the stored port when a port field is cleared

Clearing the panel-port, subscription-port or LDAP-port InputNumber
fired onChange(null), which the handlers coerced to 0; on blur Ant
Design clamped the empty field to min=1 and the next save silently
persisted port 1. For subPort that breaks the generated subscription
links; for webPort it moves the panel itself to port 1 and locks the
admin out until the port is fixed via the x-ui CLI.

Ignore null changes so clearing a port field snaps back to the last
valid value instead of committing a bogus port.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(settings): pin cleared port fields to the stored value

Clearing the subscription-port field must not reach updateSetting at
all, while typed ports still pass through unchanged. Pins the fix so a
handler refactor cannot silently reintroduce the clamped port 1.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 20:10:21 +02:00
..
__snapshots__ fix(xray): reject configs xray-core refuses, and check the fixtures against it 2026-07-28 14:43:55 +02:00
golden/fixtures fix(xray): reject configs xray-core refuses, and check the fixtures against it 2026-07-28 14:43:55 +02:00
msw Frontend dev tooling (Husky, lint-staged, MSW, Storybook) + full React Hook Form migration (#5859) 2026-07-08 13:28:37 +02:00
api-token-date.test.tsx fix(settings): require re-2FA confirmation for sensitive setting changes (#5610) 2026-06-28 15:17:15 +02:00
balancer-form-modal.test.tsx feat(balancer): add balancer-to-balancer fallback support (#5586) 2026-07-09 01:59:51 +02:00
balancer-loopback.test.ts fix(balancer): pin loopback routing rules ahead of general rules (#6054) 2026-07-21 15:48:34 +02:00
balancer-observatory-sync.test.ts fix(balancers): keep mixed strategies on one observer (#5674) 2026-07-02 18:18:30 +02:00
balancer.test.ts feat: complete Zod migration of frontend + bulk client batching (#4599) 2026-05-27 04:26:50 +02:00
basics-happy-eyeballs.test.tsx Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
client-card-comment.test.tsx feat(frontend): show client comments on mobile cards (#5942) 2026-07-14 12:59:55 +02:00
client-form-flow.test.tsx fix(clients): keep VLESS xtls-rprx-vision flow when inbound options reload (#5971) 2026-07-21 15:58:25 +02:00
client-form-modal.test.tsx [Feature]: Add a tooltip/hint to the "Password" field in the client form clarifying which protocols use it (#5809) 2026-07-07 14:43:09 +02:00
client-total-bytes.test.tsx Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
client-traffic-display.test.ts feat(clients): restore traffic usage progress bars on Clients page (#5150) 2026-06-11 12:10:49 +02:00
clients-summary.test.ts fix(clients): keep the summary card live without a page refresh 2026-06-01 06:10:25 +02:00
dns-presets.test.ts Add encrypted DNS presets (#5837) 2026-07-09 00:45:35 +02:00
dns.test.ts fix: stop forcing port 53 on DoH/DoQ DNS server entries (#5950) 2026-07-14 12:55:10 +02:00
finalmask.test.ts feat(xray): update xray-core to v26.7.28 and adapt panel 2026-07-28 13:14:06 +02:00
format-validation-error.test.ts feat(inbounds): clearer client validation errors on save 2026-05-31 22:41:58 +02:00
generated-examples.test.ts feat(api-docs): generate OpenAPI components/schemas from Go structs 2026-06-06 16:22:21 +02:00
headers.test.ts feat: complete Zod migration of frontend + bulk client batching (#4599) 2026-05-27 04:26:50 +02:00
host-link.test.ts fix(sub): bake Host VLESS Route into subscription UUIDs 2026-06-29 14:32:23 +02:00
host-schema.test.ts fix(sub): bake Host VLESS Route into subscription UUIDs 2026-06-29 14:32:23 +02:00
http-init-msw.test.ts Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
http-init.test.tsx refactor(frontend): replace axios with the native Fetch API 2026-07-08 01:09:18 +02:00
httpUtil.test.ts Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
inbound-defaults.test.ts feat(wireguard): multi-client support 2026-06-28 00:44:38 +02:00
inbound-form-adapter.test.ts Bug-label issue sweep: 16 fixes (#6083) 2026-07-23 15:34:42 +02:00
inbound-form-blocks.test.tsx Frontend dev tooling (Husky, lint-staged, MSW, Storybook) + full React Hook Form migration (#5859) 2026-07-08 13:28:37 +02:00
inbound-form-modal.test.tsx fix: resolve a batch of open bug-tagged issues (traffic accounting, share strategy, sub address, CPU) (#5477) 2026-06-22 00:22:28 +02:00
inbound-from-db.test.ts fix: enable XTLS vision flow for VLESS+XHTTP+vlessenc in UI and share links (#5157) (#5185) 2026-06-11 12:04:02 +02:00
inbound-full.test.ts feat: complete Zod migration of frontend + bulk client batching (#4599) 2026-05-27 04:26:50 +02:00
inbound-link.test.ts fix(wireguard): preserve all Allowed IPs in share link, .conf, and subscription (#6051) 2026-07-21 15:50:16 +02:00
inbound-tag.test.ts fix(inbounds): drop listen address from auto-generated inbound tag 2026-06-01 09:33:49 +02:00
link-label.test.ts feat(mtproto): adopt dolonet/mtg-multi and make MTProto inbounds multi-client 2026-07-06 16:04:32 +02:00
log-parse.test.ts fix(mtproto): reap orphaned mtg, fix SysLog viewer, mtg log visibility, export remark (#5105) (#5107) 2026-06-09 04:01:33 +02:00
mtproto-clients-link.test.ts fix(mtproto): drop the remark fragment from tg proxy deep links 2026-07-06 17:55:35 +02:00
node-list-rowkey.test.tsx Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
observatory-settings-tab.test.tsx fix(balancers): keep mixed strategies on one observer (#5674) 2026-07-02 18:18:30 +02:00
outbound-defaults.test.ts refactor(wireguard): drop removed workers field (xray v26.6.22) (#5509) 2026-06-23 16:23:02 +02:00
outbound-form-adapter.test.ts fix(xhttp): stop XMUX maxConcurrency from reverting on save 2026-07-11 20:43:47 +02:00
outbound-form-modal.test.tsx Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
outbound-link-parser.test.ts Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
outbound-tag-rename.test.ts fix(xray): sync routing rules when outbound tag is renamed (#5006) 2026-06-08 20:30:41 +02:00
outbounds-loopback-index.test.tsx Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
panel-version.test.ts feat(panel): surface dev-build version in UI, bot, and CLI 2026-06-25 02:36:41 +02:00
protocol-capabilities.test.ts feat: complete Zod migration of frontend + bulk client batching (#4599) 2026-05-27 04:26:50 +02:00
protocols.test.ts Test-quality audit: fix 2 prod bugs, strengthen weak tests, add mutation/fuzz/CI tooling (#5345) 2026-06-15 15:17:03 +02:00
remark-template-field.test.tsx feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
remark-variables.test.ts feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
rhf-form-field.test.tsx Frontend dev tooling (Husky, lint-staged, MSW, Storybook) + full React Hook Form migration (#5859) 2026-07-08 13:28:37 +02:00
routing-default-outbound.test.ts feat(xray): default outbound in basic routing (#5815) 2026-07-09 01:55:47 +02:00
routing-loopback-index.test.tsx Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
routing-reference-cleanup.test.ts fix(balancers): keep mixed strategies on one observer (#5674) 2026-07-02 18:18:30 +02:00
rule-form-preserve-fields.test.tsx Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
rule.test.ts feat: complete Zod migration of frontend + bulk client batching (#4599) 2026-05-27 04:26:50 +02:00
security.test.ts fix(reality): load dest as target alias so existing inbounds aren't wiped (#5295) 2026-06-15 00:25:10 +02:00
setting-ldap-skip-verify.test.ts feat: ldap skip tls verify (#5637) 2026-06-28 18:10:38 +02:00
setting-sub-updates.test.ts fix(ui): align the subUpdates limit with the backend and show the range 2026-07-05 20:12:21 +02:00
setup.components.ts refactor(frontend): replace axios with the native Fetch API 2026-07-08 01:09:18 +02:00
setup.msw.ts Frontend dev tooling (Husky, lint-staged, MSW, Storybook) + full React Hook Form migration (#5859) 2026-07-08 13:28:37 +02:00
setup.ts feat: complete Zod migration of frontend + bulk client batching (#4599) 2026-05-27 04:26:50 +02:00
size-formatter.test.ts feat(ui): show per-inbound live speed (#5261) 2026-06-14 22:39:40 +02:00
sniffing-field-resync.test.tsx Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
sockopt.test.ts feat: complete Zod migration of frontend + bulk client batching (#4599) 2026-05-27 04:26:50 +02:00
speed-tag-stable.test.tsx fix(frontend): stabilize speed tags on inbound and client pages (#5930) 2026-07-14 13:00:25 +02:00
spider-x.test.ts feat(reality): derive a stable per-client spiderX for shared links 2026-07-02 12:53:08 +02:00
stream-wire-normalize.test.ts feat(xray): update xray-core to v26.7.28 and adapt panel 2026-07-28 13:14:06 +02:00
stream.test.ts feat(xray): update xray-core to v26.7.11 and adapt panel 2026-07-12 00:30:47 +02:00
subscription-general-tab.test.tsx fix(settings): keep the stored port when a port field is cleared (#6121) 2026-07-28 20:10:21 +02:00
test-utils.tsx refactor(frontend): reorganize source tree & break down oversized modals/tabs (#4698) 2026-05-30 21:51:33 +02:00
tunnel-rewriteport.test.ts fix(inbounds): accept null rewritePort in tunnel settings (#5516) (#5525) 2026-06-24 12:54:05 +02:00
vless-encryption.test.ts fix(web): sync the VLESS generate-key dropdown with the encryption field 2026-07-02 17:37:04 +02:00
warp-change-ip.test.ts fix(warp): preserve outbound customization when rotating IP (#6052) 2026-07-21 15:50:00 +02:00
websocket-bridge-outbounds.test.tsx Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
websocket-shared-client.test.tsx Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
wireguard-client-config.test.ts fix(panel): use the hosting node address for WireGuard client configs (#5679) 2026-07-03 01:12:32 +02:00
wireguard-clients-link.test.ts feat(wireguard): multi-client support 2026-06-28 00:44:38 +02:00
xhttp-session-id.test.ts feat(xhttp): support sessionID* rename + sessionIDTable/Length (xray v26.6.22) (#5506) 2026-06-23 17:38:16 +02:00