[GH-ISSUE #4741] [Bug]: Client page automatically refreshes after adding an account to a group #3283

Closed
opened 2026-10-31 20:31:21 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @mifengwei on GitHub (Jun 1, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4741

Describe the bug

客户端页面将账号添加到分组后会自动刷新没

Image Image

How to reproduce the problem

Create a new group; on the client page, select the account(s) and then use the "Add to group" function.

Expected behavior

No response

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

3.2.0

Xray-core version

v26.5.9

How did you install 3x-ui?

install.sh script

Operating system

Ubuntu24

Which parts of the panel are affected?

No response

Browser (only if it is a UI bug)

No response

Is the panel behind a reverse proxy or CDN?

None

Before submitting

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
Originally created by @mifengwei on GitHub (Jun 1, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4741 ### Describe the bug 客户端页面将账号添加到分组后会自动刷新没 <img width="3694" height="826" alt="Image" src="https://github.com/user-attachments/assets/97d422fc-b16f-4471-a225-9518bac67920" /> <img width="3314" height="770" alt="Image" src="https://github.com/user-attachments/assets/5aa2c00d-093b-4d54-9a6d-a5df26b4d68d" /> ### How to reproduce the problem Create a new group; on the client page, select the account(s) and then use the "Add to group" function. ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.2.0 ### Xray-core version v26.5.9 ### How did you install 3x-ui? install.sh script ### Operating system Ubuntu24 ### Which parts of the panel are affected? _No response_ ### Browser (only if it is a UI bug) _No response_ ### Is the panel behind a reverse proxy or CDN? None ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
bsakaguchi 2026-10-31 20:31:21 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@github-actions[bot] commented on GitHub (Jun 1, 2026):

感谢您提交此 Bug 报告!

经代码分析,将账号添加到分组后,前端会调用 invalidateAll() 使 React Query 缓存失效,进而触发客户端列表和入站数据的重新拉取。这会导致表格重新渲染,表现为:

  • 分页重置回第一页
  • 滚动位置回到顶部
  • 已选中的行被清除(详见相关 Issue #4715)

这属于 UI 状态管理上的已知缺陷,数据刷新后应保留当前页码、滚动位置等表格状态。


Thank you for filing this bug report!

Based on code analysis, after a successful "add to group" operation the frontend calls invalidateAll(), which invalidates the React Query cache and triggers a full refetch of clients and inbounds data. This causes the table to re-render and typically results in:

  • Pagination resetting to page 1
  • Scroll position jumping back to the top
  • Selected rows being cleared (see also related issue #4715)

This is a UI state-management issue — table state (current page, scroll position, etc.) should be preserved after the data refetch.

Could you confirm whether you are experiencing a full browser page reload (browser tab shows a spinner / URL reloads) or just the table data re-rendering (the list refreshes in-place)? This will help narrow down the root cause.

<!-- gh-comment-id:4589322394 --> @github-actions[bot] commented on GitHub (Jun 1, 2026): 感谢您提交此 Bug 报告! 经代码分析,将账号添加到分组后,前端会调用 `invalidateAll()` 使 React Query 缓存失效,进而触发客户端列表和入站数据的重新拉取。这会导致表格重新渲染,表现为: - 分页重置回第一页 - 滚动位置回到顶部 - 已选中的行被清除(详见相关 Issue #4715) 这属于 UI 状态管理上的已知缺陷,数据刷新后应保留当前页码、滚动位置等表格状态。 --- Thank you for filing this bug report\! Based on code analysis, after a successful "add to group" operation the frontend calls `invalidateAll()`, which invalidates the React Query cache and triggers a full refetch of clients and inbounds data. This causes the table to re-render and typically results in: - Pagination resetting to page 1 - Scroll position jumping back to the top - Selected rows being cleared (see also related issue #4715) This is a UI state-management issue — table state (current page, scroll position, etc.) should be preserved after the data refetch. Could you confirm whether you are experiencing a **full browser page reload** (browser tab shows a spinner / URL reloads) or just the **table data re-rendering** (the list refreshes in-place)? This will help narrow down the root cause.
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#3283
No description provided.