mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1598] [MERGED] [codex] Optimize character library performance #5133
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#5133
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/1598
Author: @Xelvanis
Created: 5/29/2026
Status: ✅ Merged
Merged: 5/30/2026
Merged by: @Xelvanis
Base:
refactor← Head:codex/character-library-search-virtualization📝 Commits (6)
a36acfeOptimize character summary avatar loading135ddafFix summary fanout and lorebook filterse5875eaOptimize character summary searchabc87f3Fix Bunny review findings3afc25fMerge origin/refactor into character library searcha8d6406Fix Bunny review findings📊 Changes
15 files changed (+1517 additions, -640 deletions)
View changed files
📝
package.json(+1 -0)📝
pnpm-lock.yaml(+20 -0)📝
src-tauri/src/commands/storage/commands/entities.rs(+15 -39)📝
src-tauri/src/commands/storage/shared.rs(+279 -9)📝
src-tauri/src/http_dispatch.rs(+25 -4)📝
src-tauri/src/http_server.rs(+15 -5)📝
src/engine/capabilities/storage.ts(+1 -0)📝
src/features/catalog/characters/components/CharacterLibraryView.tsx(+263 -118)📝
src/features/catalog/characters/components/CharactersPanel.tsx(+378 -261)📝
src/features/catalog/characters/hooks/use-characters.ts(+57 -12)📝
src/features/catalog/characters/query-keys.ts(+2 -0)📝
src/features/catalog/lorebooks/components/LorebookEditor.tsx(+59 -7)📝
src/features/modes/game/components/GameSetupWizard.tsx(+107 -42)📝
src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx(+175 -95)📝
src/features/modes/shared/chat-ui/components/ChatSetupWizard.tsx(+120 -48)📄 Description
Linked issue
Closes #1582
Closes #1583
Closes #1584
Closes #1585
Why this change
Large character collections were expensive across several user paths: list fetches could include embedded avatar payloads, library and panel surfaces rendered every character row at once, sidebars and lorebook panels fetched the full character collection for a small set of ids, and character search had to download the collection before filtering.
What changed
Refactor impact
Primary owner:
Catalog characters, shared mode UI pickers, Rust storage, and hostable runtime asset routing.
Impact areas reviewed:
Boundary notes:
/api/assets/:kind/*pathroute.Pressure points touched:
Validation
pnpm checkpasses locallypnpm typecheckpasses locallypnpm buildpasses locallypnpm check:architecturepasses locallypnpm check:docspasses locallycargo check --manifest-path src-tauri/Cargo.toml --workspacepasses locallyManual verification notes
Automated/local validation run by Codex; template boxes are left unchecked for human verification.
pnpm typecheckpassed.pnpm buildpassed with the existing large chunk warning.pnpm check:architecturepassed.cargo check --manifest-path src-tauri\Cargo.tomlpassed.cargo test --manifest-path src-tauri\Cargo.toml apply_storage_searchpassed.cargo test --manifest-path src-tauri\Cargo.toml project_list_rowspassed.cargo test --manifest-path src-tauri\Cargo.toml avatar_asset_filenamepassed.pnpm vitest run src/features/catalog/characters/hooks/use-characters.test.ts src/shared/api/local-file-api.test.tspassed.git diff --checkpassed with only checkout LF/CRLF warnings.Manual Tauri QA for very large real character libraries was not run.
Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdNo docs or release files were changed; this implements existing tracked performance issues.
UI evidence
Not added. The main remaining human check is a native Tauri pass over a large character library for scroll/search behavior.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.