mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8920] [MERGED] perf(client): virtualize the Characters panel card list #8882
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#8882
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/8920
Author: @Gunterlie
Created: 11/6/2026
Status: ✅ Merged
Merged: 11/6/2026
Merged by: @Gunterlie
Base:
staging← Head:perf/feel-5-virtual-card-lists📝 Commits (2)
a83ac5dperf(client): virtualize the Characters panel root card list6038727fix(client): keep measured card heights when the Characters panel remounts📊 Changes
3 files changed (+103 additions, -5 deletions)
View changed files
📝
packages/client/package.json(+1 -0)📝
packages/client/src/components/panels/CharactersPanel.tsx(+82 -5)📝
pnpm-lock.yaml(+20 -0)📄 Description
Part of #8904 (slice 5, step 1).
Why
The Characters panel puts every loaded root card into the DOM. After a few pages of scrolling in a large library (2,700 cards), the panel holds hundreds of rows and opening and scrolling it stutters, worst on weak devices. Discord report: 100-card pages, "Load more", and slow large libraries.
What changed
@tanstack/react-virtual. Only the rows near the viewport (+ overscan) are mounted; rows are measured, so tags and metadata of any height work.scrollMargin, remeasured when folders open, close or change height.rangeExtractor) so its drag end and touch handlers still run after it scrolls away.transition-all(it would animatetransform, so moved rows would slide).Pages stay for now: a full card is 5–20 KB, so one request for 2,700 cards would be 20–50 MB. Step 2 (slim list request, full text on demand) removes the pages. Folders, Lorebooks, Personas and the library view are unchanged.
Measured (dev box, 2,710 seeded cards, 1440×900, headless Chromium)
resolveCssColorprobe inApp.tsx), which is slice 7 work. A staging baseline with the same script could not be completed (the dev box ran out of disk during the rebuilds), so there is no before/after number for scroll yet.Validation
tsc --noEmit -p packages/client, eslint and prettier on the changed files: pass.Manual verification
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.