mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1584] [Issue]: sidebar and lorebook panels load full character collection when they only need a handful of records #819
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#819
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 @Gunterlie on GitHub (May 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1584
Originally assigned to: @Xelvanis on GitHub.
Summary
ChatSidebarandLorebooksPanelcalluseCharacterSummaries()to load the entire character collection at startup, when in practice each only needs data for a small fixed set of characters.ChatSidebaronly displays avatars/names for characters in active recent chats (3–10 records).LorebooksPanelonly needs an ID→name map for characters already linked to a lorebook. The fix requires no backend changes.Expected behavior
Sidebar and lorebook panels load their character data instantly without pulling the full collection.
Actual behavior
ChatSidebartriggers a fulluseCharacterSummaries()fetch — after issue #1 is fixed this is 144 KB; today it is 315 MBLorebooksPaneldoes the same to build a name lookup map for a handful of linked charactersSteps to reproduce
storage_listforcharactersfiring on startup, before any character picker is openedChatSidebarmounting in the shellEnvironment
Additional context
Affected components
ChatSidebarsrc/app/shell/ChatSidebar.tsxLorebooksPanelsrc/features/catalog/lorebooks/components/LorebooksPanel.tsxLorebookEditorsrc/features/catalog/lorebooks/components/LorebookEditor.tsxFix
ChatSidebar — replace full fetch with
byIds:LorebooksPanel / LorebookEditor — same pattern, using the character IDs already present in the lorebook's linked character list.
This means
useCharacterSummaries()is no longer called on startup — the full collection is only fetched when a user explicitly opens a picker or the character library.Template check
@Promansis commented on GitHub (May 30, 2026):
Fixed with @Xelvanis pr #1598 and #1590