[PR #5151] [MERGED] feat(routing): show tag (remark) in routing rules list #5796

Closed
opened 2026-11-02 04:04:09 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/5151
Author: @aleskxyz
Created: 6/9/2026
Status: ✅ Merged
Merged: 6/11/2026
Merged by: @MHSanaei

Base: main ← Head: routing-inbound-remark-labels


📝 Commits (5)

  • 7583d46 feat(routing): show tag (remark) in routing rules list
  • b851366 Merge branch 'main' into routing-inbound-remark-labels
  • e50b8f2 Merge branch 'main' into routing-inbound-remark-labels
  • 6878cc5 Merge branch 'main' into routing-inbound-remark-labels
  • 7cb759e feat(inbounds): show "tag (remark)" consistently wherever an inbound is listed

📊 Changes

16 files changed (+128 additions, -37 deletions)

View changed files

➕ frontend/src/lib/inbounds/label.ts (+12 -0)
📝 frontend/src/pages/clients/BulkAttachInboundsModal.tsx (+2 -1)
📝 frontend/src/pages/clients/BulkDetachInboundsModal.tsx (+2 -1)
📝 frontend/src/pages/clients/ClientBulkAddModal.tsx (+2 -1)
📝 frontend/src/pages/clients/ClientFormModal.tsx (+3 -2)
📝 frontend/src/pages/clients/ClientInfoModal.tsx (+2 -1)
📝 frontend/src/pages/clients/ClientsPage.tsx (+3 -2)
📝 frontend/src/pages/clients/FilterDrawer.tsx (+2 -1)
📝 frontend/src/pages/inbounds/clients/AttachClientsModal.tsx (+3 -2)
📝 frontend/src/pages/inbounds/clients/AttachExistingClientsModal.tsx (+2 -1)
📝 frontend/src/pages/xray/routing/CriterionRow.tsx (+2 -2)
📝 frontend/src/pages/xray/routing/RouteTester.tsx (+6 -2)
📝 frontend/src/pages/xray/routing/RuleCardList.tsx (+10 -2)
📝 frontend/src/pages/xray/routing/RuleFormModal.tsx (+3 -8)
📝 frontend/src/pages/xray/routing/helpers.ts (+53 -2)
📝 frontend/src/pages/xray/routing/useRoutingColumns.tsx (+21 -9)

📄 Description

Rules table and mobile cards showed raw inboundTag while the form already used remarks. Display "tag (remark)" when a remark exists; saved rules still store tags only.

Summary

Show inbound tags with their remark in the routing rules table and mobile cards (tag (remark)), matching how inbounds are identified in the add/edit rule form. Saved routing rules are unchanged — they still store raw inboundTag values.

Why

The rule form already lists inbounds by remark, but after saving a rule the table and mobile cards only showed the auto-generated tag (e.g. in-443-tcp). That made it hard to tell which inbound a rule matched without cross-referencing the inbounds page.

Completes the inbound remark labeling started in 61105c2b for the rules list view.

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Documentation
  • Tests only
  • Build / CI / tooling
  • Other

Areas affected

  • Frontend (UI / panel pages)
  • Backend (API endpoints, login, settings)
  • Xray config generation
  • Subscription (share links / Clash / JSON)
  • Statistics / traffic counters
  • Database / migrations
  • Install / upgrade script
  • Docker image
  • Multi-node (sub-nodes)
  • Telegram bot

How was this tested?

  1. Open Xray Configs → Routing with at least one inbound that has a remark.
  2. Add or edit a rule and select an inbound in the form — confirm the dropdown still shows remarks.
  3. Save the rule and check the desktop table Inbounds column — expect in-443-tcp (IR-VLESS-443).
  4. Resize to mobile width and check the rule card inbound chip — same format.
  5. Rule with unknown tag or no remark — tag only, no error.
  6. Rule with multiple inbound tags — first tag formatted, +N chip with full list in tooltip.

No new unit tests added (display-only change in routing helpers).

Screenshots / recordings

Breaking changes

None. Display labels only; routing config and Xray output are unchanged.

Checklist

  • I tested the change locally and confirmed the described behavior.
  • I added or updated tests for the new behavior (when applicable).
  • go build ./... and the test suite pass locally.
  • For frontend changes: npm run lint, npm run typecheck, and npm run build pass.
  • I updated the Wiki / README / API docs if user-facing behavior changed.
  • My commits follow the project's existing message style.
  • I have no unrelated changes mixed into this PR.

🔄 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/5151 **Author:** [@aleskxyz](https://github.com/aleskxyz) **Created:** 6/9/2026 **Status:** ✅ Merged **Merged:** 6/11/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `routing-inbound-remark-labels` --- ### 📝 Commits (5) - [`7583d46`](https://github.com/MHSanaei/3x-ui/commit/7583d46f10b957850398645230a32b568dc25c3a) feat(routing): show tag (remark) in routing rules list - [`b851366`](https://github.com/MHSanaei/3x-ui/commit/b851366b6fc9b9cf4767ac6e9da993d83c26d1c5) Merge branch 'main' into routing-inbound-remark-labels - [`e50b8f2`](https://github.com/MHSanaei/3x-ui/commit/e50b8f2d3a55849d8e48a32e7948a2ab0d061266) Merge branch 'main' into routing-inbound-remark-labels - [`6878cc5`](https://github.com/MHSanaei/3x-ui/commit/6878cc511bb50a188f5f11962802bc70f269fb27) Merge branch 'main' into routing-inbound-remark-labels - [`7cb759e`](https://github.com/MHSanaei/3x-ui/commit/7cb759e552a73626a4ade6c7ce62932ce2da350d) feat(inbounds): show "tag (remark)" consistently wherever an inbound is listed ### 📊 Changes **16 files changed** (+128 additions, -37 deletions) <details> <summary>View changed files</summary> ➕ `frontend/src/lib/inbounds/label.ts` (+12 -0) 📝 `frontend/src/pages/clients/BulkAttachInboundsModal.tsx` (+2 -1) 📝 `frontend/src/pages/clients/BulkDetachInboundsModal.tsx` (+2 -1) 📝 `frontend/src/pages/clients/ClientBulkAddModal.tsx` (+2 -1) 📝 `frontend/src/pages/clients/ClientFormModal.tsx` (+3 -2) 📝 `frontend/src/pages/clients/ClientInfoModal.tsx` (+2 -1) 📝 `frontend/src/pages/clients/ClientsPage.tsx` (+3 -2) 📝 `frontend/src/pages/clients/FilterDrawer.tsx` (+2 -1) 📝 `frontend/src/pages/inbounds/clients/AttachClientsModal.tsx` (+3 -2) 📝 `frontend/src/pages/inbounds/clients/AttachExistingClientsModal.tsx` (+2 -1) 📝 `frontend/src/pages/xray/routing/CriterionRow.tsx` (+2 -2) 📝 `frontend/src/pages/xray/routing/RouteTester.tsx` (+6 -2) 📝 `frontend/src/pages/xray/routing/RuleCardList.tsx` (+10 -2) 📝 `frontend/src/pages/xray/routing/RuleFormModal.tsx` (+3 -8) 📝 `frontend/src/pages/xray/routing/helpers.ts` (+53 -2) 📝 `frontend/src/pages/xray/routing/useRoutingColumns.tsx` (+21 -9) </details> ### 📄 Description Rules table and mobile cards showed raw inboundTag while the form already used remarks. Display "tag (remark)" when a remark exists; saved rules still store tags only. ## Summary Show inbound tags with their remark in the routing rules table and mobile cards (`tag (remark)`), matching how inbounds are identified in the add/edit rule form. Saved routing rules are unchanged — they still store raw `inboundTag` values. ## Why The rule form already lists inbounds by remark, but after saving a rule the table and mobile cards only showed the auto-generated tag (e.g. `in-443-tcp`). That made it hard to tell which inbound a rule matched without cross-referencing the inbounds page. Completes the inbound remark labeling started in 61105c2b for the rules list view. ## Type of change - [ ] Bug fix - [x] New feature - [ ] Refactoring (no behavior change) - [ ] Documentation - [ ] Tests only - [ ] Build / CI / tooling - [ ] Other ## Areas affected - [x] Frontend (UI / panel pages) - [ ] Backend (API endpoints, login, settings) - [ ] Xray config generation - [ ] Subscription (share links / Clash / JSON) - [ ] Statistics / traffic counters - [ ] Database / migrations - [ ] Install / upgrade script - [ ] Docker image - [ ] Multi-node (sub-nodes) - [ ] Telegram bot ## How was this tested? 1. Open **Xray Configs → Routing** with at least one inbound that has a remark. 2. Add or edit a rule and select an inbound in the form — confirm the dropdown still shows remarks. 3. Save the rule and check the **desktop table** Inbounds column — expect `in-443-tcp (IR-VLESS-443)`. 4. Resize to mobile width and check the **rule card** inbound chip — same format. 5. Rule with unknown tag or no remark — tag only, no error. 6. Rule with multiple inbound tags — first tag formatted, `+N` chip with full list in tooltip. No new unit tests added (display-only change in routing helpers). ## Screenshots / recordings <!-- Add before/after screenshots of the routing table Inbounds column and mobile card chip. --> ## Breaking changes None. Display labels only; routing config and Xray output are unchanged. ## Checklist - [x] I tested the change locally and confirmed the described behavior. - [ ] I added or updated tests for the new behavior (when applicable). - [x] `go build ./...` and the test suite pass locally. - [x] For frontend changes: `npm run lint`, `npm run typecheck`, and `npm run build` pass. - [ ] I updated the Wiki / README / API docs if user-facing behavior changed. - [x] My commits follow the project's existing message style. - [x] I have no unrelated changes mixed into this PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:04:09 +07:00
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#5796
No description provided.