3x-ui/internal
H-TTTTT d623410cf4
fix(clients): persist all editable fields for clients with no inbound (#6053)
ClientService.Update only wrote most editable fields to the clients table
inside the per-inbound loop (UpdateInboundClient -> SyncInbound), so a
client with no attached inbound — the external-links / remote-
subscription client — silently dropped subId, totalGB, expiryTime,
limitIp, tgId, comment, reset, flow, security and the credential fields
on edit. Update still returned success, so the panel showed a saved
toast while the row was untouched. email/enable/group_name/ad_tag/reverse
already had dedicated unconditional direct writes that covered the
no-inbound case; the rest did not.

This was a known failure shape: commit c4448f4e added the no-inbound
fallback for email only, and TestUpdate_PersistsRecordEnable_NoInbound
covered enable only — both stayed scoped to a single field.

Extract SyncInbound's per-row field merge into applyClientRecordMerge
(unconditional for scalar quota/lifecycle/subscription fields,
preserve-when-empty for credentials/identifiers, earliest CreatedAt)
and reuse it from Update. Update's new branch runs only when the client
has no inbound, so it fixes the gap without altering the inbound-attached
path (where flow is per-inbound gated via clientWithInboundFlow and
SyncInbound already persists every field). email/reverse/group/ad_tag/
enable keep their existing dedicated writes; the new write covers the
remaining columns.

Fixes #5981
2026-07-21 15:49:43 +02:00
..
config v3.5.0 2026-07-12 22:08:19 +02:00
database fix(database): repair legacy string tgId in inbound settings on upgrade 2026-07-18 13:06:05 +02:00
eventbus Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
logger fix(inbounds): apply runtime changes after the DB commit (#5768) 2026-07-08 22:12:28 +02:00
mtproto refactor: modernize Go with strings.SplitSeq and maps.Copy 2026-07-08 22:10:54 +02:00
sub Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
tunnelmonitor style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
util Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
web fix(clients): persist all editable fields for clients with no inbound (#6053) 2026-07-21 15:49:43 +02:00
xray Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00