[PR #6143] [MERGED] fix(frontend): preserve cancellation and reject invalid query data #6106

Closed
opened 2026-11-02 04:06:25 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6143
Author: @PathGao
Created: 7/29/2026
Status: ✅ Merged
Merged: 7/29/2026
Merged by: @MHSanaei

Base: main ← Head: fix-frontend-http-boundary


📝 Commits (3)

  • e15dcc4 fix(frontend): preserve request cancellation and schema failures
  • 6194ed5 fix(frontend): limit schema failures to query boundaries
  • c0d639d fix(frontend): keep invalid settings recoverable

📊 Changes

6 files changed (+183 additions, -3 deletions)

View changed files

📝 frontend/src/api/http-init.ts (+24 -2)
📝 frontend/src/hooks/useClients.ts (+1 -1)
📝 frontend/src/test/http-init.test.tsx (+83 -0)
➕ frontend/src/test/use-all-settings.test.tsx (+28 -0)
➕ frontend/src/test/zodValidate.test.ts (+41 -0)
📝 frontend/src/utils/zodValidate.ts (+6 -0)

📄 Description

Summary

A request that specifies both a timeout and an AbortSignal now cancels when either fires, including browsers without AbortSignal.any. Existing query strings and fragments no longer cause appended parameters to form malformed URLs.

Malformed paged-client payloads are rejected before entering the TanStack Query cache. Settings remain tolerant because the backend accepts values outside the frontend schema; operators can still open and repair those settings. Malformed Xray config is logged but remains available in the raw JSON editor for the same recovery path.

Validation

  • make verify

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/6143 **Author:** [@PathGao](https://github.com/PathGao) **Created:** 7/29/2026 **Status:** ✅ Merged **Merged:** 7/29/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `fix-frontend-http-boundary` --- ### 📝 Commits (3) - [`e15dcc4`](https://github.com/MHSanaei/3x-ui/commit/e15dcc47d3ad8ca2371f4c3e4a500faf75382eda) fix(frontend): preserve request cancellation and schema failures - [`6194ed5`](https://github.com/MHSanaei/3x-ui/commit/6194ed526c4add3ab5695b31f4280cd70a2e3db1) fix(frontend): limit schema failures to query boundaries - [`c0d639d`](https://github.com/MHSanaei/3x-ui/commit/c0d639d232e260016b1e95b7eee881b0aa642f66) fix(frontend): keep invalid settings recoverable ### 📊 Changes **6 files changed** (+183 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/api/http-init.ts` (+24 -2) 📝 `frontend/src/hooks/useClients.ts` (+1 -1) 📝 `frontend/src/test/http-init.test.tsx` (+83 -0) ➕ `frontend/src/test/use-all-settings.test.tsx` (+28 -0) ➕ `frontend/src/test/zodValidate.test.ts` (+41 -0) 📝 `frontend/src/utils/zodValidate.ts` (+6 -0) </details> ### 📄 Description ## Summary A request that specifies both a timeout and an `AbortSignal` now cancels when either fires, including browsers without `AbortSignal.any`. Existing query strings and fragments no longer cause appended parameters to form malformed URLs. Malformed paged-client payloads are rejected before entering the TanStack Query cache. Settings remain tolerant because the backend accepts values outside the frontend schema; operators can still open and repair those settings. Malformed Xray config is logged but remains available in the raw JSON editor for the same recovery path. ## Validation - `make verify` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:06:25 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#6106
No description provided.