mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1512] Import Profile is a destructive full-replace with no confirmation and wipes collections absent from the file #760
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#760
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?
Originally created by @Romuromylus on GitHub (May 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1512
Originally assigned to: @Romuromylus on GitHub.
Summary
Importing a profile replaces the entire local profile with no warning. Collections that are not present in the imported file are wiped to empty rather than left untouched.
Repro
fileStorage.tablescontains onlychatsandmessages.Root cause
src-tauri/src/commands/storage/profile/legacy.rsbuildsreplacementsfor the full fixed table-mapping list and callsreplace_all_many_and_then(...). Any mapped collection missing from the imported file is replaced with an empty array.src/features/shell/settings/components/ProfileImportSection.tsxcallsimportProfileFileimmediately after the file picker, with no confirmation dialog and no "this will replace your data" warning.Impact
A full, complete backup restores correctly. But importing a partial profile, an older backup missing a table, or a hand-built export silently destroys everything not included, with no prompt and no undo.
Suggested directions (for discussion)
Environment
refactor @
ef244c80, Windows 11, Tauri desktop (pnpm tauri dev).Found during smoke test #1484 (Heavy Data / Legacy / Import Pass). Project board: https://github.com/orgs/Pasta-Devs/projects/4
@Romuromylus commented on GitHub (May 29, 2026):
Fixed by #1518 (merged into
refactorasa9cc0827). The legacy import no longer wipes collections absent from the file (and a present-but-non-array table is now rejected rather than treated as a clear), and a confirmation dialog gates the import. The moderndata.collectionsimport path still full-replaces absent collections; that is tracked separately in #1521.