mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1926] [Issue]: Active World Info semantic scan runs while toolbar button is closed #944
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#944
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 (Jun 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1926
Originally assigned to: @Xelvanis on GitHub.
Summary
Opening or switching into a chat can run the Active World Info semantic lorebook scan while the world-info panel is closed. After the semantic active-lorebook changes, that hidden scan can resolve the generation connection and call the embedding provider, which makes the app feel slower on chats with vectorized lorebook entries.
Expected behavior
The chat toolbar button should be cheap while closed. Expensive semantic lorebook scans and embedding-provider calls should only run when the user opens Active World Info, explicitly refreshes it, or another generation path needs semantic lore context.
Actual behavior
ActiveWorldInfoButtonalways enablesuseActiveLorebookEntries(chatId, true)on mount. The active lorebook query now builds an embedding source and passes it intoscanActiveLorebookEntries, soscanActiveLorebooksmay embed the last 10 messages whenever vectorized lorebook entries exist.Relevant paths:
src/features/runtime/visuals/components/ActiveWorldInfoButton.tsx: mounted toolbar button runsuseActiveLorebookEntries(chatId, true)even while closed.src/features/catalog/lorebooks/hooks/use-lorebooks.ts: active scan resolves generation connection and passesllmApi.embedasembeddingSource.src/engine/generation/active-lorebook-scanner.ts: semantic scan embeds the current query text when vectorized entries exist.src/features/modes/conversation/components/ConversationView.tsx,src/features/modes/roleplay/components/ChatRoleplaySurface.tsx, andsrc/features/modes/game/components/GameSurface.tsx: toolbar surfaces mount the button during normal chat/game use.A secondary pressure point is
src/features/catalog/lorebooks/lib/lorebook-keeper-updates.ts, where Lorebook Keeper applies now auto-vectorize touched entries. That may add post-generation provider/storage work when keeper updates are applied automatically.Steps to reproduce
5bc459c9(Fix semantic active lorebook scan) and9f397c6f(Auto-vectorize Lorebook Keeper updates).Impact area
Environment
5bc459c9,9f397c6f, current observed head8bd1d0baLogs, screenshots, or video
No runtime profile captured yet. Static trace points to hidden active-world-info semantic scan and keeper auto-vectorization as likely slowdown sources.
Regression notes
Likely regression from
5bc459c9, which made the existing always-enabled active lorebook query capable of semantic embedding.9f397c6fmay compound post-generation work by auto-vectorizing Lorebook Keeper changes.Suggested fix direction: keep the closed toolbar button cheap, then run semantic active-lorebook scans only on panel open or explicit refresh. A keyword-only/count-only closed state, plus caching keyed by chat id and recent message ids, should preserve the indicator without hidden provider calls.
Additional context
This is not a confirmed runtime profile yet. The issue is filed from code-path inspection after reports that the app feels slower after the recent commits.
Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: