mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[PR #6144] [CLOSED] fix(frontend): preserve edited server drafts #6107
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#6107
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/6144
Author: @PathGao
Created: 7/29/2026
Status: ❌ Closed
Base:
main← Head:fix-server-draft-hydration📝 Commits (3)
9373763fix(frontend): preserve edited server draftsb888a1bfix(frontend): retain Xray server projectionsf6cd87afix(frontend): keep draft controls internal📊 Changes
6 files changed (+248 additions, -39 deletions)
View changed files
📝
frontend/src/api/queries/useAllSettings.ts(+13 -13)➕
frontend/src/hooks/useServerDraft.ts(+42 -0)📝
frontend/src/hooks/useXraySetting.ts(+25 -26)📝
frontend/src/test/use-all-settings.test.tsx(+21 -0)➕
frontend/src/test/use-xray-setting.test.tsx(+71 -0)➕
frontend/src/test/useServerDraft.test.tsx(+76 -0)📄 Description
Problem
A successful settings/Xray save invalidates the query. If the user continues editing before that refetch returns, the old hydration path can overwrite the newer unsaved input. Xray also polls every second only to derive whether Save is enabled.
Change
Regression coverage
Validation
make verify🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.