mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6426] [CLOSED] feat(panel): add fast rollback from dev to stable release with local snapshot restore #6263
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#6263
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/6426
Author: @rqzbeh
Created: 9/6/2026
Status: ❌ Closed
Base:
main← Head:feat/dev-fast-rollback-stable📝 Commits (10+)
b561872feat(panel): add stable binary snapshot and rollback engine5ccd0b9feat(server): expose rollbackPanel endpoint and api docs3a131fefeat(ui): add fast rollback action and version selection to PanelUpdateModald853a32docs(api): update server API reference for rollbackPanelf94305fMerge branch 'main' into feat/dev-fast-rollback-stable9cece93fix(panel): address review feedback on rollback execution, nil db panic, and reactive modal statee7b8d6aMerge branch 'main' into feat/dev-fast-rollback-stable0eb9954fix(panel): address review feedback on online rollback slot release and postgres credentials exposure135484bMerge branch 'main' into feat/dev-fast-rollback-stabled15cfc9Merge branch 'main' into feat/dev-fast-rollback-stable📊 Changes
28 files changed (+1178 additions, -35 deletions)
View changed files
📝
docs/content/docs/en/reference/api/server.mdx(+8 -1)📝
docs/public/openapi.json(+52 -0)📝
frontend/public/openapi.json(+52 -0)📝
frontend/src/pages/api-docs/endpoints.ts(+16 -0)📝
frontend/src/pages/index/PanelUpdateModal.css(+10 -0)📝
frontend/src/pages/index/PanelUpdateModal.tsx(+119 -2)➕
frontend/src/test/panel-update-modal.test.tsx(+104 -0)📝
internal/web/controller/panel_update_test.go(+53 -0)📝
internal/web/controller/server.go(+13 -4)📝
internal/web/service/panel/panel.go(+263 -11)📝
internal/web/service/panel/panel_test.go(+54 -0)➕
internal/web/service/panel/snapshot.go(+141 -0)➕
internal/web/service/panel/snapshot_test.go(+139 -0)📝
internal/web/service/server.go(+4 -4)📝
internal/web/service/server_pg_restore_test.go(+59 -0)📝
internal/web/translation/ar-EG.json(+7 -1)📝
internal/web/translation/en-US.json(+7 -1)📝
internal/web/translation/es-ES.json(+7 -1)📝
internal/web/translation/fa-IR.json(+7 -1)📝
internal/web/translation/id-ID.json(+7 -1)...and 8 more files
📄 Description
Summary
Adds a fast, reliable one-click rollback mechanism to revert
devanddev-latestbuilds back to official stable release versions in 3x-ui.Why
Users running bleeding-edge
devbuilds ordev-latestchannel releases can encounter unexpected bugs or regressions. Downgrading manually requires CLI knowledge and manual backups. This feature enables one-click rollback directly from the panel overview modal, supporting both instant offline restoration from a pre-upgrade local snapshot and online installation of the latest stable release, with automatic pre-rollback database safety backups.Type of change
Areas affected
How was this tested?
snapshot_test.gocovering saving stable installation snapshots, reading metadata, restoring binaries, verifying executable permissions, and handling corrupt/missing snapshots.TestStartRollback_LocalSuccess,TestStartRollback_InvalidMode,TestPanelRollbackInvalidModeinpanel_test.goandpanel_update_test.go.go test ./internal/web/service/panel/... ./internal/web/controller/... ./internal/web/...passes 100%.panel-update-modal.test.tsxtesting rollback button visibility when in dev mode, mode selection when local snapshot differs from latest online release, and POST payload verification to/panel/api/server/rollbackPanel.npm run typecheck,npm run lint,npm run format:check,npm run test, andnpm run buildpass without errors.Breaking changes
None.
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.