[PR #1373] [MERGED] Fix managed backup workflow #5045

Closed
opened 2026-10-22 04:12:44 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1373
Author: @cha1latte
Created: 5/27/2026
Status: ✅ Merged
Merged: 5/27/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/issue-1347-managed-backups


📝 Commits (4)

  • 3d47e7d Fix managed backup workflow
  • 60ae42c Merge remote-tracking branch 'upstream/refactor' into fix/issue-1347-managed-backups
  • b8003d4 Merge remote-tracking branch 'upstream/refactor' into fix/issue-1347-managed-backups
  • 3439244 Fix remote command parity for managed backups

📊 Changes

10 files changed (+602 additions, -16 deletions)

View changed files

📝 src-tauri/src/commands/storage.rs (+4 -0)
➕ src-tauri/src/commands/storage/backup.rs (+350 -0)
➕ src-tauri/src/commands/storage/commands/backup.rs (+28 -0)
📝 src-tauri/src/commands/storage/profile.rs (+16 -1)
📝 src-tauri/src/commands/storage/profile/assets.rs (+31 -6)
📝 src-tauri/src/http_dispatch.rs (+7 -1)
📝 src-tauri/src/lib.rs (+4 -0)
📝 src/features/shell/settings/components/SettingsPanel.tsx (+128 -8)
📝 src/shared/api/profile-api.ts (+30 -0)
📝 src/shared/api/remote-runtime.ts (+4 -0)

📄 Description

Linked issue

Closes #1347

Why this change

  • The refactor branch kept profile import/export, but lost the legacy managed backup manager workflow. That left users without the create/list/delete/download full-backup path used for data-safety recovery.

What changed

  • Added Rust managed backup create/list/delete/download support for the refactor app-data layout.
  • Registered the backup commands for both Tauri and the remote runtime dispatcher/allowlist.
  • Added shared backup API helpers and restored Settings controls for creating, listing, downloading, and deleting managed backups.
  • Added backup-specific Rust tests and a scratch repro ledger for the restored surfaces and destructive-path negative controls.

Refactor impact

Primary owner:

Rust storage, shared API, remote runtime, Settings UI.

Impact areas reviewed:

  • Tauri command registration
  • Remote runtime command dispatch
  • Profile import/export compatibility
  • Managed app-data and asset folders
  • Settings advanced panel

Boundary notes:

  • Backup creation writes managed folders under app-data/backups/marinara-backup-*.
  • Backup ZIP/profile restore uses the current refactor data/collections layout and includes RESTORE.txt noting that legacy raw backups used storage/.
  • Delete/download validate managed backup names and canonicalize the backups root before acting.
  • Profile export/import commands are otherwise unchanged.

Pressure points touched:

  • src-tauri/src/lib.rs command registration
  • src-tauri/src/http_dispatch.rs remote runtime command dispatcher
  • src-tauri/src/commands/storage/profile.rs and profile/assets.rs for backup-safe asset manifests
  • SettingsPanel advanced backup controls

Validation

  • pnpm check passes locally
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Playwright, screenshot, or recording evidence added for UI changes
  • Remote runtime smoke checked when relevant

Manual verification notes

  • Codex ran node scratch/issue-1347-managed-backups-repro.mjs; before the fix it failed on the missing managed backup surfaces, after the fix it printed Managed backup workflow surfaces are present.
  • Codex ran cargo test --manifest-path src-tauri/Cargo.toml storage_commands::backup::tests; 2 tests passed, including create/list/download/delete and invalid backup-name negative controls.
  • Codex ran pnpm check; architecture, frontend typecheck, Rust check, and docs check passed.
  • Codex ran node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json; proof gate passed.
  • Manual Tauri shell check still recommended before merge: open Settings -> Advanced, create a managed backup, download it, delete it, and import the downloaded zip through Import Profile.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

UI evidence

No screenshot evidence added. The UI surface is Settings -> Advanced backup controls; Codex verified the restored API/UI wiring statically and the backup behavior through Rust tests.


🔄 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/Pasta-Devs/Marinara-Engine/pull/1373 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/27/2026 **Status:** ✅ Merged **Merged:** 5/27/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-1347-managed-backups` --- ### 📝 Commits (4) - [`3d47e7d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3d47e7d4e65dd12d72a913f839472c66667521d5) Fix managed backup workflow - [`60ae42c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/60ae42ca4d88e35fa4afbfd388d862c3f971b716) Merge remote-tracking branch 'upstream/refactor' into fix/issue-1347-managed-backups - [`b8003d4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b8003d4642bb5b4dfc1aa94ff62d383ac99307d8) Merge remote-tracking branch 'upstream/refactor' into fix/issue-1347-managed-backups - [`3439244`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3439244254696fc21d4342f9256ddff8919c5fe2) Fix remote command parity for managed backups ### 📊 Changes **10 files changed** (+602 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/src/commands/storage.rs` (+4 -0) ➕ `src-tauri/src/commands/storage/backup.rs` (+350 -0) ➕ `src-tauri/src/commands/storage/commands/backup.rs` (+28 -0) 📝 `src-tauri/src/commands/storage/profile.rs` (+16 -1) 📝 `src-tauri/src/commands/storage/profile/assets.rs` (+31 -6) 📝 `src-tauri/src/http_dispatch.rs` (+7 -1) 📝 `src-tauri/src/lib.rs` (+4 -0) 📝 `src/features/shell/settings/components/SettingsPanel.tsx` (+128 -8) 📝 `src/shared/api/profile-api.ts` (+30 -0) 📝 `src/shared/api/remote-runtime.ts` (+4 -0) </details> ### 📄 Description ## Linked issue Closes #1347 ## Why this change - The refactor branch kept profile import/export, but lost the legacy managed backup manager workflow. That left users without the create/list/delete/download full-backup path used for data-safety recovery. ## What changed - Added Rust managed backup create/list/delete/download support for the refactor app-data layout. - Registered the backup commands for both Tauri and the remote runtime dispatcher/allowlist. - Added shared backup API helpers and restored Settings controls for creating, listing, downloading, and deleting managed backups. - Added backup-specific Rust tests and a scratch repro ledger for the restored surfaces and destructive-path negative controls. ## Refactor impact Primary owner: Rust storage, shared API, remote runtime, Settings UI. Impact areas reviewed: - Tauri command registration - Remote runtime command dispatch - Profile import/export compatibility - Managed app-data and asset folders - Settings advanced panel Boundary notes: - Backup creation writes managed folders under app-data/backups/marinara-backup-*. - Backup ZIP/profile restore uses the current refactor data/collections layout and includes RESTORE.txt noting that legacy raw backups used storage/. - Delete/download validate managed backup names and canonicalize the backups root before acting. - Profile export/import commands are otherwise unchanged. Pressure points touched: - src-tauri/src/lib.rs command registration - src-tauri/src/http_dispatch.rs remote runtime command dispatcher - src-tauri/src/commands/storage/profile.rs and profile/assets.rs for backup-safe asset manifests - SettingsPanel advanced backup controls ## Validation - [ ] `pnpm check` passes locally - [ ] `pnpm typecheck` passes locally - [ ] `pnpm build` passes locally - [ ] `pnpm check:architecture` passes locally - [ ] `pnpm check:docs` passes locally - [ ] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [ ] Rust clippy/tests were run for Rust behavior changes - [ ] Browser or Tauri app manual verification completed - [ ] Playwright, screenshot, or recording evidence added for UI changes - [ ] Remote runtime smoke checked when relevant ### Manual verification notes - Codex ran `node scratch/issue-1347-managed-backups-repro.mjs`; before the fix it failed on the missing managed backup surfaces, after the fix it printed `Managed backup workflow surfaces are present.` - Codex ran `cargo test --manifest-path src-tauri/Cargo.toml storage_commands::backup::tests`; 2 tests passed, including create/list/download/delete and invalid backup-name negative controls. - Codex ran `pnpm check`; architecture, frontend typecheck, Rust check, and docs check passed. - Codex ran `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json`; proof gate passed. - Manual Tauri shell check still recommended before merge: open Settings -> Advanced, create a managed backup, download it, delete it, and import the downloaded zip through Import Profile. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence No screenshot evidence added. The UI surface is Settings -> Advanced backup controls; Codex verified the restored API/UI wiring statically and the backup behavior through Rust tests. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:12:44 +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
Pasta-Devs/Marinara-Engine#5045
No description provided.