mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[PR #5687] [MERGED] feat(ui): client-realtime-speed #5961
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#5961
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/5687
Author: @NikanZeyaei
Created: 6/30/2026
Status: ✅ Merged
Merged: 7/4/2026
Merged by: @Mahyardana
Base:
main← Head:feature/client-realtime-speed📝 Commits (4)
d2ca2b6refactor(inbounds): extract TRAFFIC_POLL_INTERVAL_S to shared utilf57bf65feat(clients): derive per-client live speed from traffic WebSocket deltas971dbf8feat(clients): render speed column and mobile card linefae99bfi18n(clients): add pages.clients.speed key to all 13 locales📊 Changes
19 files changed (+93 additions, -6 deletions)
View changed files
➕
frontend/src/components/clients/ClientSpeedTag.tsx(+26 -0)📝
frontend/src/hooks/useClients.ts(+23 -1)➕
frontend/src/lib/traffic/poll-interval.ts(+1 -0)📝
frontend/src/pages/clients/ClientsPage.css(+6 -0)📝
frontend/src/pages/clients/ClientsPage.tsx(+23 -1)📝
frontend/src/pages/inbounds/useInbounds.ts(+1 -4)📝
internal/web/translation/ar-EG.json(+1 -0)📝
internal/web/translation/en-US.json(+1 -0)📝
internal/web/translation/es-ES.json(+1 -0)📝
internal/web/translation/fa-IR.json(+1 -0)📝
internal/web/translation/id-ID.json(+1 -0)📝
internal/web/translation/ja-JP.json(+1 -0)📝
internal/web/translation/pt-BR.json(+1 -0)📝
internal/web/translation/ru-RU.json(+1 -0)📝
internal/web/translation/tr-TR.json(+1 -0)📝
internal/web/translation/uk-UA.json(+1 -0)📝
internal/web/translation/vi-VN.json(+1 -0)📝
internal/web/translation/zh-CN.json(+1 -0)📝
internal/web/translation/zh-TW.json(+1 -0)📄 Description
Summary
Closes https://github.com/MHSanaei/3x-ui/issues/5653
Adds a real-time upload/download speed column to the Clients page (and a speed line on the mobile card) derived from the existing per-email 5 s deltas in the
trafficWebSocket event. Backend, DB, and OpenAPI are untouched.Why
The Clients page only showed cumulative up/down totals, so an admin watching a spike on the dashboard's "overall speed" could not tell which client was driving it. The data was already on the wire (xray-core emits per-email deltas, the Go job broadcasts them as
traffic.clientTraffics[], the Inbounds page already consumes the siblingtraffics[]array) — only the client-side render was missing.Closes the per-client real-time speed feature request.
Type of change
Areas affected
How was this tested?
Open the panel → Clients tab → confirm a
↑ x/s / ↓ y/stag appears in the new Speed column for active clients, updates every 5 s, and falls to—within one poll after a client goes idle. Resize to mobile width to confirm the same line shows under the cumulative traffic bar on each card. Switch between en, zh, ru, fa, ar to confirm the header translates and RTL renders cleanly.Screenshots / recordings
Breaking changes
None.
Checklist
go build ./...and the test suite pass locally.npm run lint,npm run typecheck, andnpm run buildpass.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.