mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6970] feat(nodes): add remote Xray and panel restart actions #6553
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#6553
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/6970
Author: @HamedSanaei
Created: 10/27/2026
Status: 🔄 Open
Base:
main← Head:codex/issue-6937-node-restart📝 Commits (3)
00ca379test(service): start system sampler outside virtual clockf2aefdcfeat(nodes): add remote Xray and panel restart actionsd37fb05Merge upstream main into codex/issue-6937-node-restart📊 Changes
40 files changed (+941 additions, -4 deletions)
View changed files
📝
docs/content/docs/en/operations/multi-node.mdx(+18 -0)📝
docs/content/docs/en/reference/api/nodes.mdx(+27 -1)➕
docs/public/images/node-restart-confirm.png(+0 -0)➕
docs/public/images/node-restart-desktop.png(+0 -0)➕
docs/public/images/node-restart-mobile.png(+0 -0)📝
docs/public/openapi.json(+82 -0)📝
frontend/public/openapi.json(+82 -0)📝
frontend/src/api/queries/useNodeMutations.ts(+17 -0)📝
frontend/src/pages/api-docs/endpoints.ts(+14 -0)📝
frontend/src/pages/nodes/NodeList.tsx(+30 -1)📝
frontend/src/pages/nodes/NodesPage.tsx(+51 -0)📝
frontend/src/test/node-list-a11y.test.tsx(+1 -0)📝
frontend/src/test/node-list-rerender.test.tsx(+1 -0)📝
frontend/src/test/node-list-rowkey.test.tsx(+1 -0)📝
frontend/src/test/node-list-untrusted-i18n.test.tsx(+1 -0)📝
frontend/src/test/node-metrics-availability.test.tsx(+2 -0)➕
frontend/src/test/node-restart.test.tsx(+147 -0)➕
internal/nodee2e/node_restart_test.go(+55 -0)📝
internal/web/controller/api.go(+3 -2)📝
internal/web/controller/node.go(+30 -0)...and 20 more files
📄 Description
Summary
Add separate Restart Xray and Restart Panel actions to each directly configured node's desktop and mobile menu. Confirm the node name, prevent duplicate pending requests, and report failures without automatic retries.
Why
The master Nodes page can probe and update nodes, but cannot restart their services. Closes #6937.
Xray restart uses the existing runtime. Panel restart uses the existing three-second panel/subscription lifecycle; success acknowledges scheduling. Invalid, missing, and disabled node IDs are rejected before dispatch, while a stale offline heartbeat does not block contacting an enabled node. Transitive nodes remain read-only.
Master-side Nodes API permissions are unchanged. On the node, panel restart requires
adminornode-admin; mTLS requires an explicitnode-adminbearer token.node-syncretains Xray restart authority and cannot restart the panel. Older nodes may need upgrading fornode-adminpanel restart. Includes all 14 translations and regenerated API and operation docs.A separate prerequisite commit fixes an existing Windows test-fixture deadlock, reproduced on pristine upstream
c621ba90: initialize gopsutil's process-wide load sampler before the public-IP status test enterssynctest. That commit changes no production behavior.Type of change
Areas affected
How was this tested?
make verifytargets passed: 2,023 frontend tests in 216 files, Go tests, lint/type/format checks, panel/Go/Storybook builds, and generated API checks. The final docs comparison was completed after adding Git'scmpto the Windows PATH.go test -p 2 -race -shuffle=on -count=1 -timeout 25m ./internal/web/service ./internal/web/controller ./internal/web/runtime ./internal/webScreenshots / recordings
Chromium screenshots of the production build with sample node data. Backend behavior is covered separately by the HTTP and real-process tests above.
Breaking changes
None. No database migration or existing API changes. Remote panel restart needs the node permissions described above.
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.