mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1545] [Issue]: Chat-scoped lorebooks show active in UI but are not loaded for prompts #791
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#791
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/1545
Originally assigned to: @Xelvanis on GitHub.
Found during the 2026-05-29 native Tauri Lorebooks QA pass on
origin/refactorcommitf120eb33.Proof method: seeded disposable lorebook/chat records through the app's Tauri storage API, then ran the app's own prompt-preview assembly from the native WebView. The same pass included positive controls for selected, global, character-scoped, persona-scoped, and roleplay-trigger-filtered entries.
What happened
A lorebook with
chatIdset to the current chat did not activate unless it was also explicitly listed in chat metadataactiveLorebookIds.Repro
chatIdequal to that chat id andisGlobal: false.LQA_CHAT_SCOPED_CONTENT_SHOULD_APPEAR.metadata.activeLorebookIds.Expected
The chat-scoped lorebook should apply to that chat. The Chat Settings drawer already treats
lorebook.chatId === chat.idas an activeChatreason.Actual
The chat-scoped entry did not appear in prompt preview and was not returned by
scanActiveLorebookEntries(...).Likely owner
lorebookAppliesToContext(...)insrc/engine/generation/prompt-assembly.tschecks enabled/global, character scope, persona scope, andmetadata.activeLorebookIds, but does not checklorebook.chatId === chat.id.The UI active-reason logic in
src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsxdoes include the chat-id check, so the UI and runtime contract can disagree.Acceptance criteria
lorebook.chatId === chat.idas an active chat-scoped lorebook.activeLorebookIds.