mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6255] [Issue]: Character token estimates are undercounted in Character Library and Characters panel #3491
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#3491
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 @minikkeuen on GitHub (Sep 16, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6255
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Character token estimates can be significantly undercounted in the Character Library and Characters panel because some UI paths calculate the estimate from the compact character catalog fields instead of the full character card data.
Expected behavior
Character token estimates should represent the full character card text used by the existing character card token estimator, including fields that are not included in the compact catalog representation.
The Character Library and Characters panel should display the same full-card estimate consistently.
Actual behavior
The character catalog introduced a compact representation of character data, but some token estimate paths operate on those compact fields.
As a result, fields omitted from the compact representation are also omitted from the estimate, causing the displayed token count to be lower than the full-card estimate.
For one reproduced character:
The catalog API itself can provide the full-card estimate, but the Characters panel recalculates the value from compact parsed data instead of using the catalog estimate.
Steps to reproduce
Environment
Logs, screenshots, or video
Example reproduced value:
The lower value matches the estimate produced when only the compact catalog fields are passed through the character card estimator.
Additional context
The discrepancy comes from token estimates being recalculated from compact catalog fields rather than the full character card data.
A fix can calculate the token estimate from the full stored character card while building the catalog, then use that catalog-provided estimate consistently in the Character Library and Characters panel without restoring the full card JSON to catalog responses.
Template check