mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1550] [Issue]: Deleting a lorebook leaves orphaned entries and folders #792
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#792
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 @Xelvanis on GitHub (May 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1550
Originally assigned to: @Promansis on GitHub.
Summary
Deleting a lorebook removes the lorebook record but leaves its
lorebook-entriesandlorebook-foldersrows behind with the deletedlorebookId.Expected behavior
Deleting a lorebook should also delete or otherwise clean up its child entries and folders. This matches the catalog UI confirmation copy that says all entries inside the lorebook will be lost.
Actual behavior
Native Tauri QA on
origin/refactorcreated a disposable lorebook with one folder and one entry, then deleted the lorebook through the same storage delete path used by the catalog hooks. The lorebook was gone, but queryinglorebook-entriesandlorebook-foldersby the deletedlorebookIdstill returned the child records.Steps to reproduce
lorebookIdset to that lorebook.storage_delete/storageApi.delete("lorebooks", id).lorebook-entriesandlorebook-foldersfiltered by the deleted lorebook id.Impact area
Environment
origin/refactoratf120eb33v24.16.0, pnpm10.33.2rustc 1.95.0Logs, screenshots, or video
No public screenshot needed. Native QA proof showed
storageApi.delete("lorebooks", id)returning{ "deleted": true };storageApi.get("lorebooks", id)then returnednull, while filteredlorebook-entriesandlorebook-foldersstill returned rows with the deletedlorebookId.Regression notes
Not checked against an older branch. This was found during a fresh Lorebooks native QA pass on the current refactor branch.
Additional context
Likely owner is the storage delete path for
lorebooks, not just the React catalog hook.src-tauri/src/commands/storage/commands/entities.rshas special cascading behavior for chats, but no equivalent cleanup for lorebooks was observed in the delete path.Acceptance criteria:
lorebook-entriesandlorebook-folders, or safely archives/marks them in a way that cannot leak into later scans/import/export results.Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: