Skip to content

feat: Implement Proxy Groups for Better Organization#1018

Draft
Wikid82 wants to merge 9 commits into
developmentfrom
feature/proxy_groups
Draft

feat: Implement Proxy Groups for Better Organization#1018
Wikid82 wants to merge 9 commits into
developmentfrom
feature/proxy_groups

Conversation

@Wikid82
Copy link
Copy Markdown
Owner

@Wikid82 Wikid82 commented May 15, 2026

Summary

Adds proxy group management to Charon, allowing proxy hosts to be organized into named groups for easier administration.


Backend

  • models/proxy_group.go — New ProxyGroup GORM model with UUID primary key, name, description, and host associations
  • models/proxy_host.go — Added GroupID (nullable FK) and Group association fields
  • services/proxy_group_service.go — CRUD service: create, list, get, update, delete with validation
  • services/proxyhost_service.go — Extended GetProxyHosts to support optional group filtering via group_id query param
  • api/handlers/proxy_group_handler.go — REST handler for /api/v1/proxy-groups (CRUD + host listing per group)
  • api/routes/routes.go — Registered proxy group routes under /api/v1/proxy-groups

Frontend

  • api/proxyGroups.ts — TanStack Query API client for proxy group CRUD
  • api/proxyHosts.ts — Added group_id field and group filter support
  • components/ProxyGroupBadge.tsx — Badge component displaying assigned group name
  • components/ProxyGroupForm.tsx — Form component for group assignment with combobox
  • hooks/useProxyGroups.ts — TanStack Query hooks: useProxyGroups, useCreateProxyGroup, useUpdateProxyGroup, useDeleteProxyGroup
  • pages/ProxyHosts.tsx — Proxy group column added to table; inline group assignment UI
  • Locale filesproxyGroup.* translation keys added for de, en, es, fr, zh

Tests

  • Backend unit tests: proxy_group_handler_test.go, proxy_group_service_test.go, proxyhost_service_group_test.go
  • Frontend unit tests: proxyGroups.test.ts, ProxyGroupBadge.test.tsx, ProxyGroupForm.test.tsx
  • Updated ProxyHosts test suite (12 files) to account for new group column
  • E2E Playwright spec: tests/proxy-groups.spec.ts

Quality Gates

  • ESLint: 0 errors (1006 pre-existing warnings, unchanged)
  • Frontend patch coverage: 100% on changed lines
  • Backend patch coverage: 66.2% (non-blocking per policy; new service/handler paths covered)
  • Semgrep: 0 findings in changed files (36 pre-existing findings in unrelated test fixtures)
  • vitest.config.ts coverage thresholds updated to reflect expanded test surface

@Wikid82 Wikid82 self-assigned this May 15, 2026
@Wikid82 Wikid82 added enhancement New feature or request high Important feature, should be included beta Part of beta release backend Server-side code frontend UI/UX code feature New functionality database Database-related ui User interface go manual-testing labels May 15, 2026
@Wikid82 Wikid82 added this to Charon May 15, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in Charon May 15, 2026
@Wikid82 Wikid82 moved this from Backlog to In Progress in Charon May 15, 2026
@github-advanced-security
Copy link
Copy Markdown
Contributor

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 15, 2026

✅ Supply Chain Verification Results

PASSED

📦 SBOM Summary

  • Components: 1487

🔍 Vulnerability Scan

Severity Count
🔴 Critical 0
🟠 High 0
🟡 Medium 4
🟢 Low 2
Total 6

📎 Artifacts

  • SBOM (CycloneDX JSON) and Grype results available in workflow artifacts

Generated by Supply Chain Verification workflow • View Details

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Add ProxyGroup model, service, and CRUD API handlers with full
test coverage for host grouping functionality.

- Add ProxyGroup model with UUID, name, description, color fields
- Add ProxyGroupID FK and ProxyGroup preload to ProxyHost
- Add ProxyGroupService with Create/List/GetByUUID/Update/Delete
- Add ProxyGroupHandler with GET/POST/PUT/DELETE routes
- Extend ProxyHostHandler to resolve proxy_group_id by UUID or uint
- AutoMigrate ProxyGroup before ProxyHost in routes.go
- Add 22 tests across service, handler, and preload integration

Closes #254
Add ProxyGroups API client with TanStack Query hooks
Add ProxyGroupBadge and ProxyGroupForm components
Integrate proxy group selection into ProxyHosts page
Add locale strings (de, en, es, fr, zh) for proxy group feature
Add frontend unit tests for API client, components, and hooks
Add E2E Playwright spec for proxy group management workflows
Update ProxyHosts tests to reflect proxy group column addition
Update vitest config for new component test coverage
Add proxy group column and assignment UI to ProxyHosts table
Update proxyHosts API client to include group_id field
Add proxy group locale keys for all supported languages (de, en, es, fr, zh)
Update ProxyHosts tests to cover proxy group column and filtering
Extend vitest config for expanded proxy hosts test coverage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Server-side code beta Part of beta release database Database-related enhancement New feature or request feature New functionality frontend UI/UX code go high Important feature, should be included manual-testing ui User interface

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants