[PR #6147] [CLOSED] fix(frontend): preserve edited server drafts #6110

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

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6147
Author: @PathGao
Created: 7/29/2026
Status: ❌ Closed

Base: main ← Head: fix-server-draft-hydration-v2


📝 Commits (7)

  • b753b30 fix(frontend): improve config block contrast
  • 5532bcb fix(frontend): preserve config block theme fills
  • 9c050c4 fix(frontend): preserve edited server drafts
  • dd932b8 fix(frontend): retain Xray server projections
  • e9be219 fix(frontend): keep draft controls internal
  • b53ad41 fix(frontend): rehydrate saved redacted settings
  • a7125cd fix(frontend): preserve config block themes

📊 Changes

8 files changed (+285 additions, -47 deletions)

View changed files

📝 frontend/.storybook/preview.tsx (+4 -3)
📝 frontend/src/api/queries/useAllSettings.ts (+18 -13)
📝 frontend/src/components/clients/ConfigBlock.css (+5 -4)
➕ frontend/src/hooks/useServerDraft.ts (+38 -0)
📝 frontend/src/hooks/useXraySetting.ts (+25 -26)
📝 frontend/src/test/use-all-settings.test.tsx (+51 -1)
➕ frontend/src/test/use-xray-setting.test.tsx (+71 -0)
➕ frontend/src/test/useServerDraft.test.tsx (+73 -0)

📄 Description

Prerequisite

Includes #6146 because its confirmed Storybook contrast correction is required for this branch to pass the shared frontend CI. Merge #6146 first; this PR will then reduce to the draft-hydration change.

Summary

  • Preserve Settings and Xray edits across background refetches.
  • Keep read-only Xray projections refreshing while the editable draft is dirty.
  • Remove the one-second dirty-state polling loop.

Validation

  • npm run test -- useServerDraft.test.tsx use-xray-setting.test.tsx use-all-settings.test.tsx
  • npm run typecheck
  • #6146 full CI is green.

🔄 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/6147 **Author:** [@PathGao](https://github.com/PathGao) **Created:** 7/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-server-draft-hydration-v2` --- ### 📝 Commits (7) - [`b753b30`](https://github.com/MHSanaei/3x-ui/commit/b753b309d2867102fdd9ff126a4858ff16ef7c12) fix(frontend): improve config block contrast - [`5532bcb`](https://github.com/MHSanaei/3x-ui/commit/5532bcbd7ea0a68e60dd3f424eef2f80770ea6fd) fix(frontend): preserve config block theme fills - [`9c050c4`](https://github.com/MHSanaei/3x-ui/commit/9c050c40e051eadcd37763657fde8cc97737a549) fix(frontend): preserve edited server drafts - [`dd932b8`](https://github.com/MHSanaei/3x-ui/commit/dd932b826936c1d37b0c7e9a61a08ad4424af3bd) fix(frontend): retain Xray server projections - [`e9be219`](https://github.com/MHSanaei/3x-ui/commit/e9be219cf0bcfefef05be2fbc14c99a0e001825a) fix(frontend): keep draft controls internal - [`b53ad41`](https://github.com/MHSanaei/3x-ui/commit/b53ad41dec998bfa0f09712ec6dfa4c318e225a5) fix(frontend): rehydrate saved redacted settings - [`a7125cd`](https://github.com/MHSanaei/3x-ui/commit/a7125cde62708639c5f1a0d8b3e8ebc6ff57f44a) fix(frontend): preserve config block themes ### 📊 Changes **8 files changed** (+285 additions, -47 deletions) <details> <summary>View changed files</summary> 📝 `frontend/.storybook/preview.tsx` (+4 -3) 📝 `frontend/src/api/queries/useAllSettings.ts` (+18 -13) 📝 `frontend/src/components/clients/ConfigBlock.css` (+5 -4) ➕ `frontend/src/hooks/useServerDraft.ts` (+38 -0) 📝 `frontend/src/hooks/useXraySetting.ts` (+25 -26) 📝 `frontend/src/test/use-all-settings.test.tsx` (+51 -1) ➕ `frontend/src/test/use-xray-setting.test.tsx` (+71 -0) ➕ `frontend/src/test/useServerDraft.test.tsx` (+73 -0) </details> ### 📄 Description ## Prerequisite Includes #6146 because its confirmed Storybook contrast correction is required for this branch to pass the shared frontend CI. Merge #6146 first; this PR will then reduce to the draft-hydration change. ## Summary - Preserve Settings and Xray edits across background refetches. - Keep read-only Xray projections refreshing while the editable draft is dirty. - Remove the one-second dirty-state polling loop. ## Validation - `npm run test -- useServerDraft.test.tsx use-xray-setting.test.tsx use-all-settings.test.tsx` - `npm run typecheck` - #6146 full CI is green. --- <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:26 +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#6110
No description provided.