mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6469] [MERGED] feat(clients): preserve traffic counters in portable export/import #6292
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#6292
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/6469
Author: @mrchatam
Created: 9/11/2026
Status: ✅ Merged
Merged: 9/27/2026
Merged by: @MHSanaei
Base:
main← Head:feat/portable-clients-preserve-traffic📝 Commits (5)
7efa159feat(clients): preserve traffic counters in portable export/import5c43233Merge remote-tracking branch 'origin/main' into pr/6469a3a9b12Merge branch 'main' into feat/portable-clients-preserve-traffic6c82a3cfix(clients): restore imported traffic only onto rows the import created70eedb2fix(groups): keep imported traffic out of group totals📊 Changes
11 files changed (+551 additions, -69 deletions)
View changed files
📝
docs/content/docs/en/reference/api/clients.mdx(+38 -26)📝
docs/public/openapi.json(+9 -3)📝
frontend/public/openapi.json(+9 -3)📝
frontend/src/pages/api-docs/endpoints.ts(+3 -3)📝
internal/web/controller/client.go(+8 -4)📝
internal/web/controller/client_partial_apply_test.go(+51 -0)📝
internal/web/service/client.go(+12 -7)📝
internal/web/service/client_bulk.go(+20 -6)📝
internal/web/service/client_groups.go(+13 -3)📝
internal/web/service/client_portable.go(+100 -14)📝
internal/web/service/client_portable_test.go(+288 -0)📄 Description
Summary
trafficsnapshot fromclient_traffics(up/down/total, plusresetCount/lastOnline/lastSubFetch).traffickeep the previous zero-start behavior.Fixes #5858
Test plan
go test ./internal/web/service/ -run 'TestExportImportPreservesTrafficCounters|TestImportClientsAppliesTrafficForOrphans' -count=1🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.