[PR #6145] [CLOSED] fix(frontend): keep DNS hosts synchronized #6108

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/6145
Author: @PathGao
Created: 7/29/2026
Status: ❌ Closed

Base: main ← Head: fix-dns-hosts-source


📝 Commits (2)

  • 60ad7dd fix(frontend): keep DNS hosts synchronized
  • 267ed6b fix(frontend): preserve incomplete DNS hosts

📊 Changes

2 files changed (+86 additions, -16 deletions)

View changed files

📝 frontend/src/pages/xray/dns/DnsTab.tsx (+14 -16)
➕ frontend/src/test/dns-tab.test.tsx (+72 -0)

📄 Description

Problem

DnsTab mirrors dns.hosts into local state and refreshes that mirror only when DNS is enabled or disabled. An external config update while DNS remains enabled leaves the editor on old hosts, so a later edit can overwrite the new server value.

Change

  • Derive host rows directly from templateSettings.dns.hosts.
  • Keep edits on the existing immutable template update path.
  • Remove the effect and local mirror.

Regression coverage

  • An external hosts refresh updates the rendered hosts row.

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/6145 **Author:** [@PathGao](https://github.com/PathGao) **Created:** 7/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-dns-hosts-source` --- ### 📝 Commits (2) - [`60ad7dd`](https://github.com/MHSanaei/3x-ui/commit/60ad7dd1f0db3c2a872c7b71c0fcfbb0f2bf2579) fix(frontend): keep DNS hosts synchronized - [`267ed6b`](https://github.com/MHSanaei/3x-ui/commit/267ed6bd9e5725c364c7fc4306fd0cae3054fc34) fix(frontend): preserve incomplete DNS hosts ### 📊 Changes **2 files changed** (+86 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/pages/xray/dns/DnsTab.tsx` (+14 -16) ➕ `frontend/src/test/dns-tab.test.tsx` (+72 -0) </details> ### 📄 Description ## Problem DnsTab mirrors `dns.hosts` into local state and refreshes that mirror only when DNS is enabled or disabled. An external config update while DNS remains enabled leaves the editor on old hosts, so a later edit can overwrite the new server value. ## Change - Derive host rows directly from `templateSettings.dns.hosts`. - Keep edits on the existing immutable template update path. - Remove the effect and local mirror. ## Regression coverage - An external hosts refresh updates the rendered hosts row. ## 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#6108
No description provided.