[PR #7094] fix(groups): preserve group traffic totals on global client reset #6646

Open
opened 2026-11-07 14:34:22 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/7094
Author: @BenjaminMitchell-D0FB
Created: 11/7/2026
Status: 🔄 Open

Base: main ← Head: BenjaminMitchell-D0FB/fix-global-client-reset-group-traffic


📝 Commits (1)

  • 88389f1 fix(groups): preserve group traffic totals on global client reset

📊 Changes

3 files changed (+49 additions, -0 deletions)

View changed files

📝 internal/web/service/client_group_reset_test.go (+34 -0)
📝 internal/web/service/client_groups.go (+12 -0)
📝 internal/web/service/client_traffic.go (+3 -0)

📄 Description

Summary

Preserve group traffic totals when an administrator selects Reset all client traffic on the Clients page.

Why

The global reset clears client counters while leaving group baselines unchanged. This can erase accumulated group usage or hide new traffic after a group reset. Adjust group baselines in the same transaction before zeroing client counters.

Fixes #7093

Type of change

  • Bug fix

Areas affected

  • Backend (API endpoints, login, settings)
  • Statistics / traffic counters

How was this tested?

  • Added a regression test for preserving accumulated usage and counting fresh upload and download traffic after the global reset.
  • git diff --check passed.
  • Go build and tests were not run locally because the Go toolchain was unavailable.

Breaking changes

None.

Checklist

  • Tested locally and confirmed the described behavior.
  • Added a regression test.
  • Go build and tests pass locally.
  • Commit follows the project's existing message style.
  • Diff is limited to this issue.

🔄 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/7094 **Author:** [@BenjaminMitchell-D0FB](https://github.com/BenjaminMitchell-D0FB) **Created:** 11/7/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `BenjaminMitchell-D0FB/fix-global-client-reset-group-traffic` --- ### 📝 Commits (1) - [`88389f1`](https://github.com/MHSanaei/3x-ui/commit/88389f14b937e45279a66a9cec4e10af1f7cbdf6) fix(groups): preserve group traffic totals on global client reset ### 📊 Changes **3 files changed** (+49 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `internal/web/service/client_group_reset_test.go` (+34 -0) 📝 `internal/web/service/client_groups.go` (+12 -0) 📝 `internal/web/service/client_traffic.go` (+3 -0) </details> ### 📄 Description ## Summary Preserve group traffic totals when an administrator selects **Reset all client traffic** on the Clients page. ## Why The global reset clears client counters while leaving group baselines unchanged. This can erase accumulated group usage or hide new traffic after a group reset. Adjust group baselines in the same transaction before zeroing client counters. Fixes #7093 ## Type of change - [x] Bug fix ## Areas affected - [x] Backend (API endpoints, login, settings) - [x] Statistics / traffic counters ## How was this tested? - Added a regression test for preserving accumulated usage and counting fresh upload and download traffic after the global reset. - `git diff --check` passed. - Go build and tests were not run locally because the Go toolchain was unavailable. ## Breaking changes None. ## Checklist - [ ] Tested locally and confirmed the described behavior. - [x] Added a regression test. - [ ] Go build and tests pass locally. - [x] Commit follows the project's existing message style. - [x] Diff is limited to this issue. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#6646
No description provided.