mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6347] Character editor Lorebook tab crashes when an embedded lorebook entry has no secondary_keys #3544
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#3544
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 @stonebystone on GitHub (Sep 19, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6347
Problem
Opening a character card and scrolling to the Lorebook tab throws:
The embedded-lorebook entry list in
CharacterEditor.tsxrendersentry.secondary_keys.lengthandentry.keys.join(...)directly. Character Card V2 makessecondary_keysoptional, and cards imported from JSON or PNG keep whatever the author wrote, so a book where some entries omit the field crashes the tab. Reproduced on a card whose 12-entry embedded book has 6 entries withoutsecondary_keys. The ST importer normalizes these arrays, but other import paths and hand-authored cards do not.Proposal
keysandsecondary_keysdefensively (missing or non-array → empty list, trimmed strings only).Owner: @stonebystone (implemented with Claude Code).
@stonebystone commented on GitHub (Sep 19, 2026):
Closing: the reporter fixed the affected card's data locally and does not plan a PR. The crash itself (unguarded
entry.secondary_keys.lengthin the Character editor's embedded-lorebook list, for V2 cards that omit the optional field) is still real if a maintainer wants to pick it up.