mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8923] [MERGED] perf: load the character list in one slim request, no pages #8881
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#8881
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/8923
Author: @Gunterlie
Created: 11/6/2026
Status: ✅ Merged
Merged: 11/6/2026
Merged by: @Gunterlie
Base:
staging← Head:perf/feel-5b-slim-card-list📝 Commits (4)
0338994perf(server): serve all slim character rows for virtualized panelsf28b817perf(client): load the complete slim character panel list once18cb60dperf(client): replace startup full-card page drain with one slim catalog request992c6f6fix(server): normalize tag filters like the search text📊 Changes
7 files changed (+288 additions, -171 deletions)
View changed files
📝
packages/client/src/components/chat/HomeCharacterLibrary.tsx(+2 -2)📝
packages/client/src/components/panels/CharactersPanel.tsx(+51 -112)📝
packages/client/src/hooks/use-characters.ts(+29 -46)📝
packages/server/src/routes/characters.routes.ts(+2 -0)📝
packages/server/src/services/storage/character-catalog.ts(+57 -11)📝
packages/shared/src/types/character-catalog.ts(+13 -0)➕
scripts/regressions/character-catalog-summary.regression.ts(+134 -0)📄 Description
Part of #8904 (slice 5, step 2). Follows #8920.
Why
useAllCharacterCatalog) drained the whole catalog with full text in 31 sequential requests (7.7 MB with short seeded cards; tens of MB with real cards). This exists onstagingtoday.What changed
GET /api/characters/cataloggets an opt-inview=summary. It returns all matching rows in one response with only list fields (id,name,comment,creator,version,tags,favorite,summary≤ 200 chars,tokenEstimate,hasOnboarding,nameColor,avatarPath,avatarCrop,createdAt,updatedAt,cardSpec,cardSpecVersion). Search, tag/exclude-tag, folder and sort filters run on full data before the rows are slimmed; totals and folder counts are unchanged. Withoutview=summarythe response and its 100-row limit are unchanged.useAllCharacterCatalog(Home browser, bulk tags dialog, editor tag suggestions) makes one summary request instead of the 31-page full-text drain; every caller only reads summary fields. The unuseduseCharacterFolderMembershook is removed.CharacterLibraryViewstays on the full paged view: its detail pane shows the full card sections.Measured (dev box, 3,010 seeded cards)
Browser check (headless Chromium 1440×900): panel shows 12 mounted rows, no Load more, folder opens with one 170 KB summary request, search with match / no match, return from the editor; no page errors. Not measured: panel open time at 4× CPU.
Validation
tsc --noEmit, eslint and prettier on changed files,pnpm localization:check: pass.character-catalog-summary, plus catalog-search, token-estimate, card-tag-search, bulk-tags and group-cache: pass.Manual verification
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.