[PR #6940] [CLOSED] feat(client-hosts): add HostGroup-based client host defaults #6533

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

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6940
Author: @bigbossstard
Created: 10/26/2026
Status: ❌ Closed

Base: main ← Head: upstream/client-host-panel


📝 Commits (10+)

  • b615bf9 feat: add client-group HostGroup defaults on v3.11.0
  • c9b919c fix: remove duplicated unrelated CI jobs from HostGroup PR
  • d008033 fix: invalidate subscription cache after group HostGroup changes
  • 3bf9c18 fix: invalidate subscriptions after client group rename or delete
  • 98575e9 fix(ui): show errors when saving group HostGroup defaults fails
  • b8389bc fix(ui): handle group HostGroup load and save failures
  • a1bcc24 fix(ui): report HostGroup save errors without unhandled rejections
  • f58d4c4 i18n: clarify group HostGroup assignment labels
  • 229bbea fix(client-host): invalidate subscription cache after group assignment
  • f6cb3a9 test(client-host): verify assignment cache invalidation

📊 Changes

44 files changed (+1634 additions, -1786 deletions)

View changed files

➖ .github/workflows/ci.yml (+0 -355)
➖ .github/workflows/claude-issue-analyst.yml (+0 -205)
➖ .github/workflows/claude-pr-review.yml (+0 -416)
➖ .github/workflows/cleanup_caches.yml (+0 -31)
➖ .github/workflows/codeql.yml (+0 -66)
➖ .github/workflows/docker.yml (+0 -62)
➖ .github/workflows/docs-ci.yml (+0 -69)
➖ .github/workflows/docs-deploy.yml (+0 -77)
➖ .github/workflows/mutation.yml (+0 -62)
➖ .github/workflows/release.yml (+0 -405)
📝 docs/content/docs/en/reference/api/clients.mdx (+24 -1)
📝 docs/public/openapi.json (+133 -0)
📝 frontend/public/openapi.json (+133 -0)
📝 frontend/src/pages/api-docs/endpoints.ts (+29 -0)
📝 frontend/src/pages/groups/GroupsPage.tsx (+184 -0)
📝 frontend/src/pages/hosts/HostsPage.tsx (+17 -6)
📝 internal/database/db.go (+1 -0)
📝 internal/database/migrate_data.go (+1 -0)
➕ internal/database/model/client_group_host.go (+10 -0)
📝 internal/sub/host_order_test.go (+26 -0)

...and 24 more files

📄 Description

Summary

Add HostGroup-based default host assignments for client groups.

  • Add HostGroup assignment support to client groups.
  • Preserve explicit per-client host assignments as the higher-priority override.
  • Preserve legacy behavior for groups without an assigned HostGroup.
  • Fail closed for stale or invalid group assignments.
  • Keep assignment updates transactional and invalidate relevant subscription caches.
  • Add regression tests and the related UI, API, OpenAPI, documentation, and translations.

Scope

This PR contains only the group-level HostGroup feature and directly related changes. It does not modify GitHub Actions workflows or Telegram bot code, and it does not reimplement the existing individual client-host assignment functionality.

Validation

  • Go test suite: passed on isolated rerun.
  • golangci-lint: passed.
  • Frontend lint, typecheck, and build: passed.
  • Browser E2E: 7/7 passed.
  • Additional CI checks passed in the previous run.

An earlier full CI run encountered a failure in the unrelated Telegram bot test TestScreenArtReprobeWindow; the isolated Go-test rerun passed.


🔄 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/6940 **Author:** [@bigbossstard](https://github.com/bigbossstard) **Created:** 10/26/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `upstream/client-host-panel` --- ### 📝 Commits (10+) - [`b615bf9`](https://github.com/MHSanaei/3x-ui/commit/b615bf923e4afa458a6f0a65aa277d96c7c92941) feat: add client-group HostGroup defaults on v3.11.0 - [`c9b919c`](https://github.com/MHSanaei/3x-ui/commit/c9b919c1086bcd679d3e24bdd555d860095c6e4f) fix: remove duplicated unrelated CI jobs from HostGroup PR - [`d008033`](https://github.com/MHSanaei/3x-ui/commit/d00803340d10a05883722ed9da185aa12f37c507) fix: invalidate subscription cache after group HostGroup changes - [`3bf9c18`](https://github.com/MHSanaei/3x-ui/commit/3bf9c180a9619bbb7a8378d4af349fbbd128c0b4) fix: invalidate subscriptions after client group rename or delete - [`98575e9`](https://github.com/MHSanaei/3x-ui/commit/98575e9a1d06e0bdccf44f5508554a623e6b69bf) fix(ui): show errors when saving group HostGroup defaults fails - [`b8389bc`](https://github.com/MHSanaei/3x-ui/commit/b8389bccffc4ab3d4a68b21694ced8c031d78372) fix(ui): handle group HostGroup load and save failures - [`a1bcc24`](https://github.com/MHSanaei/3x-ui/commit/a1bcc24b00140e6bf5290286e3b9dc0a4f7fb96b) fix(ui): report HostGroup save errors without unhandled rejections - [`f58d4c4`](https://github.com/MHSanaei/3x-ui/commit/f58d4c4be5c978e79d467e8931c80c6d3f3fd5a0) i18n: clarify group HostGroup assignment labels - [`229bbea`](https://github.com/MHSanaei/3x-ui/commit/229bbea5d6f9bda308f1d82f638c524d3bebbc35) fix(client-host): invalidate subscription cache after group assignment - [`f6cb3a9`](https://github.com/MHSanaei/3x-ui/commit/f6cb3a9ad2aaa26b4dfe890a3bb4a90f821c66db) test(client-host): verify assignment cache invalidation ### 📊 Changes **44 files changed** (+1634 additions, -1786 deletions) <details> <summary>View changed files</summary> ➖ `.github/workflows/ci.yml` (+0 -355) ➖ `.github/workflows/claude-issue-analyst.yml` (+0 -205) ➖ `.github/workflows/claude-pr-review.yml` (+0 -416) ➖ `.github/workflows/cleanup_caches.yml` (+0 -31) ➖ `.github/workflows/codeql.yml` (+0 -66) ➖ `.github/workflows/docker.yml` (+0 -62) ➖ `.github/workflows/docs-ci.yml` (+0 -69) ➖ `.github/workflows/docs-deploy.yml` (+0 -77) ➖ `.github/workflows/mutation.yml` (+0 -62) ➖ `.github/workflows/release.yml` (+0 -405) 📝 `docs/content/docs/en/reference/api/clients.mdx` (+24 -1) 📝 `docs/public/openapi.json` (+133 -0) 📝 `frontend/public/openapi.json` (+133 -0) 📝 `frontend/src/pages/api-docs/endpoints.ts` (+29 -0) 📝 `frontend/src/pages/groups/GroupsPage.tsx` (+184 -0) 📝 `frontend/src/pages/hosts/HostsPage.tsx` (+17 -6) 📝 `internal/database/db.go` (+1 -0) 📝 `internal/database/migrate_data.go` (+1 -0) ➕ `internal/database/model/client_group_host.go` (+10 -0) 📝 `internal/sub/host_order_test.go` (+26 -0) _...and 24 more files_ </details> ### 📄 Description ## Summary Add HostGroup-based default host assignments for client groups. - Add HostGroup assignment support to client groups. - Preserve explicit per-client host assignments as the higher-priority override. - Preserve legacy behavior for groups without an assigned HostGroup. - Fail closed for stale or invalid group assignments. - Keep assignment updates transactional and invalidate relevant subscription caches. - Add regression tests and the related UI, API, OpenAPI, documentation, and translations. ## Scope This PR contains only the group-level HostGroup feature and directly related changes. It does not modify GitHub Actions workflows or Telegram bot code, and it does not reimplement the existing individual client-host assignment functionality. ## Validation - Go test suite: passed on isolated rerun. - golangci-lint: passed. - Frontend lint, typecheck, and build: passed. - Browser E2E: 7/7 passed. - Additional CI checks passed in the previous run. An earlier full CI run encountered a failure in the unrelated Telegram bot test TestScreenArtReprobeWindow; the isolated Go-test rerun passed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi changed title from [PR #6940] feat(client-hosts): add HostGroup-based client host defaults to [PR #6940] [CLOSED] feat(client-hosts): add HostGroup-based client host defaults 2026-11-07 14:33:50 +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#6533
No description provided.