mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2158] [Issue]: Edits to a linked embedded lorebook no longer sync back into the character's character_book #1067
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#1067
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 (Jun 4, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2158
Originally assigned to: @Promansis on GitHub.
Summary
When a character is imported with an embedded
character_book, the importer creates and links a standalone lorebook. In the legacy app, editing or deleting entries on that linked lorebook mirrored the change back into the character'sdata.character_book. On the refactor branch that sync-back is gone, so the character editor's Lorebook tab (which readscharacter_book) shows stale entries and the user's edits appear to revert.Expected behavior
After importing a character with an embedded lorebook, editing/deleting entries via "Edit Linked Lorebook" should update
data.character_bookso the change is reflected when the character editor's Lorebook tab is reopened. This is exactly what the legacycharacter-book-sync.tswas written to guarantee.Actual behavior
Entry create/update/delete on the linked lorebook updates only the standalone lorebook-entries rows.
data.character_bookis never re-synced, soCharacterLorebookTabshows the frozen import-time book; edits/deletes appear to roll back on reopen, and the standalone lorebook and embedded book diverge permanently (exports carry the stale book).Steps to reproduce
character_bookwith at least one entry.Impact area
Environment
93555d4bRegression notes
Worked in legacy (main @
c49f1d95). main:packages/server/src/services/lorebook/character-book-sync.ts:115-137(syncCharacterBookFromLorebook) invoked after every entry create/update/delete/bulk/move atpackages/server/src/routes/lorebooks.routes.ts:407,422,436,453,508,510. refactor @93555d4b: no equivalent mirror-back exists; entry mutations route through genericstorageApi.create/update/delete('lorebook-entries')(src/features/catalog/lorebooks/hooks/use-lorebooks.ts:275-310) which never touches character data; the onlycharacter_bookwrite-back in Rust is the clear-on-whole-lorebook-delete path (src-tauri/src/commands/storage/commands/entities.rs:995).CharacterLorebookTab.tsx:21-22reads fromformData.character_book.