3x-ui/internal/web/translation
mrnickson-hue ed9686bf29
Some checks failed
CI / go-test (push) Has been cancelled
CI / postgres-durable-first (push) Has been cancelled
CI / codegen (push) Has been cancelled
CI / govulncheck (push) Has been cancelled
CI / race (push) Has been cancelled
CI / fuzz-smoke (push) Has been cancelled
CI / golangci (push) Has been cancelled
CI / frontend (push) Has been cancelled
CodeQL Advanced / Analyze (go) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (javascript-typescript) (push) Has been cancelled
Release 3X-UI / build (386) (push) Has been cancelled
Release 3X-UI / build (amd64) (push) Has been cancelled
Release 3X-UI / build (arm64) (push) Has been cancelled
Release 3X-UI / build (armv5) (push) Has been cancelled
Release 3X-UI / build (armv6) (push) Has been cancelled
Release 3X-UI / build (armv7) (push) Has been cancelled
Release 3X-UI / build (s390x) (push) Has been cancelled
Release 3X-UI / Build for Windows (push) Has been cancelled
Release 3X-UI / Publish rolling dev release (push) Has been cancelled
fix(clients): include Telegram ID in client list search (#5888)
* fix(clients): include Telegram ID in client list search

clientMatchesSearch only checked Email/SubID/Comment/UUID/Password/Auth,
so searching the client list for a Telegram user ID never matched even
though the field is stored on every client.

This is a real regression, not a field that was simply never included:
before the paged search endpoint (#4500), the frontend searched with
ObjectUtil.deepSearch() over the full client object, which recursed into
every field including tgId. Replacing that with a fixed backend field
list silently dropped it (along with a few other fields, but tgId is the
one that's actually needed here since it's the panel's own way of
looking a client up when it only knows their Telegram ID).

TgID is int64 (0 = unset), so it can't sit in the existing []string
candidates array — matched separately via strconv, and skipped when 0 to
avoid a needle of "0" spuriously matching every client without a
Telegram ID.

Fixes #5880

* fix(clients): drop explanatory comment, mention Telegram ID in search hint

Addresses review feedback on #5888:
- Removed the // comment block above the TgID check in
  clientMatchesSearch per repo convention (code should read on its own).
- Updated searchPlaceholder in all 13 locale files to mention Telegram ID,
  since the search box now actually matches on it.

* test(clients): remove TgID search test per maintainer request
2026-07-10 12:20:35 +02:00
..
ar-EG.json fix(clients): include Telegram ID in client list search (#5888) 2026-07-10 12:20:35 +02:00
en-US.json fix(clients): include Telegram ID in client list search (#5888) 2026-07-10 12:20:35 +02:00
es-ES.json fix(clients): include Telegram ID in client list search (#5888) 2026-07-10 12:20:35 +02:00
fa-IR.json fix(clients): include Telegram ID in client list search (#5888) 2026-07-10 12:20:35 +02:00
id-ID.json fix(clients): include Telegram ID in client list search (#5888) 2026-07-10 12:20:35 +02:00
ja-JP.json fix(clients): include Telegram ID in client list search (#5888) 2026-07-10 12:20:35 +02:00
pt-BR.json fix(clients): include Telegram ID in client list search (#5888) 2026-07-10 12:20:35 +02:00
ru-RU.json fix(clients): include Telegram ID in client list search (#5888) 2026-07-10 12:20:35 +02:00
tr-TR.json fix(clients): include Telegram ID in client list search (#5888) 2026-07-10 12:20:35 +02:00
uk-UA.json fix(clients): include Telegram ID in client list search (#5888) 2026-07-10 12:20:35 +02:00
vi-VN.json fix(clients): include Telegram ID in client list search (#5888) 2026-07-10 12:20:35 +02:00
zh-CN.json fix(clients): include Telegram ID in client list search (#5888) 2026-07-10 12:20:35 +02:00
zh-TW.json fix(clients): include Telegram ID in client list search (#5888) 2026-07-10 12:20:35 +02:00