mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #555] [MERGED] Fix embedded lorebook deletion and ghost editor states #4671
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#4671
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/Pasta-Devs/Marinara-Engine/pull/555
Author: @kolacheee
Created: 5/8/2026
Status: ✅ Merged
Merged: 5/8/2026
Merged by: @cha1latte
Base:
main← Head:fix/embedded-lorebook-sync📝 Commits (3)
abc5655Fix embedded lorebook deletion and ghost editor statesd94a85cGuard embedded lorebook sync by metadata pointere559183Sync embedded lorebooks across transfer paths📊 Changes
8 files changed (+310 additions, -11 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
packages/client/src/components/characters/CharacterEditor.tsx(+12 -2)📝
packages/client/src/components/lorebooks/LorebookEditor.tsx(+15 -1)📝
packages/client/src/hooks/use-lorebooks.ts(+31 -2)📝
packages/server/src/routes/lorebooks.routes.ts(+27 -2)📝
packages/server/src/services/import/marinara.importer.ts(+18 -1)📝
packages/server/src/services/import/st-character.importer.ts(+14 -3)➕
packages/server/src/services/lorebook/character-book-sync.ts(+192 -0)📄 Description
Linked issue
https://github.com/Pasta-Devs/Marinara-Engine/issues/554
Closes #554
Why this change
Edits made via "Edit Linked Lorebook" on a character with an embedded lorebook silently failed to persist: deleted entries reappeared after reopening the character, deleting the lorebook left ghost preview entries plus a phantom Reimport / Edit button, and clicking Edit on a fresh import sometimes opened an editor stuck on a permanent shimmer.
Three coupled root causes:
dataeven after a refetch errors with 404 — so a stale pointer rendered a populated-looking ghost editor while the entries query honestly reported empty.isLoading || !lorebook, which a 404'd query satisfies forever.What changed
Server:
Client:
Validation
pnpm checkpasses locallyCONTRIBUTING.mdDocs and release impact
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.