mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #5981] [MERGED] fix(lorebooks): keep chat entry toggles scoped to their chat #7012
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#7012
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/5981
Author: @SpicyMarinara
Created: 9/9/2026
Status: ✅ Merged
Merged: 9/9/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/chat-scoped-lore-5954📝 Commits (4)
b0e8fe6chore: claim chat-scoped lore entry controls6b16602fix: scope Chat Settings lore entry toggles to their chat28560daMerge remote-tracking branch 'origin/staging' into fix/chat-scoped-lore-59548161f5cMerge remote-tracking branch 'origin/staging' into fix/chat-scoped-lore-5954📊 Changes
9 files changed (+297 additions, -9 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)➕
e2e/chat-lorebook-entry-scope.e2e.ts(+124 -0)📝
packages/client/src/components/chat/ChatSettingsDrawer.tsx(+2 -0)📝
packages/client/src/components/lorebooks/LorebookEntryRow.tsx(+32 -8)📝
packages/client/src/features/chat-settings/inline-editors/InlineLorebookEntriesEditor.tsx(+10 -0)📝
packages/client/src/hooks/use-chats.ts(+17 -0)📝
packages/client/src/localization/locales/en.json(+7 -1)📝
packages/server/src/routes/chats.routes.ts(+27 -0)➕
scripts/regressions/chat-lorebook-entry-scope.regression.ts(+77 -0)📄 Description
Linked issue
Closes #5954.
Why this change
The lorebook entry toggle inside Chat Settings changed the shared entry, disabling it in every chat. Players need this control to affect only the chat they are configuring.
What changed
Use the existing chat entry-state overrides for the inline enable switch. The server merges one flag atomically so ephemeral counters and concurrent changes to other entries survive. An entry disabled in its shared lorebook remains unavailable until enabled there. Text and other entry edits remain shared, with explicit localized scope guidance.
Validation
Automated proof completed:
pnpm check(localization, TypeScript, ESLint, build, and browser-test types).pnpm regression:prompt.The real Fastify/file-storage regression
chat-lorebook-entry-scope.regression.ts: two chats, global isolation, preserved ephemeral counters, concurrent updates, invalid input, missing resources, and the global disabled floor. Baseline failed with the missing chat-scoped route; the fix passed.Nine browser cases across Game, Roleplay, and Conversation on desktop Chromium, mobile Chromium, and mobile WebKit. Toggling, shared content edits, reload persistence, and globally disabled entries passed. The mobile row screenshot was inspected.
pnpm checkpasses locallyContainer (Docker / Podman) built and ran without issue
Ran the app, clicked through the changes manually
Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
Above manual verification completed (describe below)
Read and followed
CONTRIBUTING.mdManual verification notes
Manually verify toggling a shared lore entry in two personal chats and check light-theme readability on a physical mobile device. Automated browser proof used isolated test data, not personal conversations.
Docs and release impact
Added a concise Unreleased fix and canonical English localization keys. No version or documentation-guide change.
UI evidence (if applicable)
The checked browser captures are generated by
e2e/chat-lorebook-entry-scope.e2e.ts; the existing shared row and switch styles are reused.Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.